select
a.name,
tmp.k,
tmp.v
from (
select
'zhangsan' name,
map(1,20,2,30) score
)a lateral view explode_map(score) tmp as k,v;
执行报错:
errCode = 2, detailMessage = Unknown table 'v'
改写为下面的形式可以执行成功,但是不是我预期的结果
select
a.name,
tmp.k
from (
select
'zhangsan' name,
map(1,20,2,30) score
)a lateral view explode_map(score) tmp as k