【发布时间】:2014-02-19 22:49:10
【问题描述】:
在 hive 中,您可以对 Hive 数组中的不同值进行分组,如下所示:
SELECT i, count(distinct cookieID) as unique_visitor, count(*) as impressions FROM table LATERAL VIEW explode(interests) interestTable AS i GROUP BY i;
如何在 Presto 中实现同样的效果?
不必与 group by 在一起,只需与 Hive 中相同的结果(希望更快)就可以了。
干杯
【问题讨论】: