Hive中提示Expression Not In Group By Key的解决办法

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Hive中提示Expression Not In Group By Key的解决办法相关的知识,希望对你有一定的参考价值。

参考技术A 1.Hive不允许直接访问非group by字段;
2.对于非group by字段,可以用Hive的collect_set函数收集这些字段,返回一个数组;
3.使用数字下标,可以直接访问数组中的元素;

使用collect_set()函数包围非group by字段后,问题解决。

以上是关于Hive中提示Expression Not In Group By Key的解决办法的主要内容,如果未能解决你的问题,请参考以下文章

Hive SemanticException [Error 10025]: Line 18:7 Expression not in GROUP BY key ‘xxx‘

mysql Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nona

mysql报错Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column问题(示例

mysql报错Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column问题(示例

Expression #14 of SELECT list is not in GROUP BY clause and contains nonaggregated column '(示例代码

Expression #1 of ORDER BY clause is not in SELECT list