我需要执行如下查询
select
myUsualField, SOME_FUNCTION(myAnotherField) as myUnusualField
from MYTABLE
group by
myUsualField, myUnusualField
在hive中,这个查询失败了:在表中的其他字段中找不到字段myunusualfield。
这是否意味着为了在hive中用任何计算列进行分组,我必须使用子查询?
select * from (
select
myUsualField, SOME_FUNCTION(myAnotherField) as myUnusualField
from MYTABLE
) sourceTable
group by
myUsualField, myUnusualField
1条答案
按热度按时间6rqinv9w1#