【发布时间】:2016-08-11 12:33:14
【问题描述】:
我在 Hive 中使用以下命令。并得到正确的结果。
select acct_id,collect_list(expr_dt) from experiences
> group by acct_id;
输出:
900 ["2015-03-31"]
707 ["2015-03-31","2014-12-10"]
903 ["2015-03-31"]
-435 ["2015-03-31"]
718 ["2015-03-31","2014-06-03"]
我想获取每个帐户的最长日期。
当我尝试执行以下查询时出现错误。
select acct_id,max(collect_list(expr_dt)) from experiences
> group by acct_id;
错误是 -
SemanticException [Error 10128]: Line 1:19 Not yet supported place for UDAF 'collect_list'
我想在单个查询中进行全部操作。
【问题讨论】: