不在hiveql重新调整NullPointerException null的子查询中

不在hiveql重新调整NullPointerException null的子查询中,hive,hiveql,Hive,Hiveql,我试图在配置单元中运行一个查询,涉及在同一个表中内联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 首先过滤掉

我试图在配置单元中运行一个查询,涉及在同一个表中内联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)

这很有效。但是,为什么它显式地需要一个临时表呢?与内联操作有关吗?