加入了横向视图不支持
问题描述:
我运行下面的查询,并得到错误加入了横向视图不支持加入了横向视图不支持
select e.fileVersion, e.fileID, e.filedate
from table_1
lateral view explode(filedata) fileTable as e join table2 r
where
e.fileVersion = r.fileVersion
在这里,我想加入2代表与FILEVERSION, 谁能告诉如何解决这个问题
答
select t.*
from (select ft.f.fileVersion
,ft.f.fileID
,ft.f.filedate
from table_1 t
lateral view explode(t.filedata) ft as f
) t
join table2 r
on t.fileVersion = r.fileVersion
这可能是性能打击吧? ,查询table_1提取所有记录,然后将数据与table2进行比较, - 抱歉,如果我错了,我是sql和hive的新手 – Ganesh
您认为在子查询中放入某些东西会影响优化器吗? –