我在Hue 3.10.0中运行hivesql并没有返回任何结果,像这样的Hive SQL:
select t1.id
,t2.id
from (
select id from table1 where date = '20181121' and type = 'a'
) t1
left join(
select id from table1 where date = '20181121' and type = 'b' and
) t2
on t1.id = t2.id;
然后我运行sunquery t1:
select id from table1 where date = '20181121' and type = 'a';
它重新运行437行,
我尝试在子查询t1之后添加“分组依据”,并进行如下查询:
select t1.id
,t2.id
from (
select id from table1 where date = '20181121' and type = 'a' group by id
) t1
left join(
select id from table1 where date = '20181121' and type = 'b' and
) t2
on t1.id = t2.id;
它还返回437行;
然后我将table1更改为另一个返回正常结果的表,我使用另一个工具“超集”运行上面的第一个查询,它也返回了437行,因此我怀疑“色相”引起了这个问题,但是我困惑为什么会发生?
答案 0 :(得分:0)
可能是色相引起的问题。您可以尝试在 trim(t1.id)= trim(t2.id)
上使用在两侧修剪并尝试