hive - NOT IN 子查询与 hiveql 重新调整 NullPointerException null
问题描述
我正在尝试在配置单元中运行一个查询,该查询涉及在同一个表中内联 2 个数组并使用 NOT IN 运算符有效地获取差异
select c1 from t1
lateral view inline(m1) m1
where m1.key = 'x'
AND t1.c1 NOT IN
(
select c1 from t1
lateral view inline(m2) m2
where m2.key = 'y'
);
上面的查询返回
FAILED: NullPointerException null
解决方案
首先过滤掉所有值为'y'的c1
With temp as
(select distinct c1 from t1
lateral view inline(m2) m2
where m2.key = 'y')
select c1 from t1
lateral view inline(m1) m1
where m1.key = 'x')
and c1 not in (select c1 from temp)
推荐阅读
- vba - 如何在运行时向用户窗体添加无边框文本框
- c++ - Qt 和 C++ 如何共享类中的项目
- visual-studio - 将项目/解决方案从 VS2015 复制到 VS2017
- jenkins - 使用 Jenkins 构建 MS 的 SonarQube 扫描仪在最后一步失败
- python - pyodbc 控制台错误消息
- java - 如何从 Serviceclass 正确调用 Spring Boot 工具类中的方法?
- session-cookies - Drupal 8 CiviCRM 创建用户无效会话密钥
- javascript - Slick Slider 停止循环
- gitlab - 通过 gitlab 提交代码,但我的本地代码未更新
- react-native - 如何在 react-native-tab-view 中设置选定选项卡的样式