hive1.2.1的cube函数使用问题

FAILED: SemanticException [Error 10210]: Grouping sets aggregations (with rollups or cubes) are not allowed if aggregation function parameters overlap with the aggregation functions columns

该错误是指cube中的维度不能参数聚合函数的运算

hive1.2.1的cube函数使用问题_第1张图片

但是在spark-sql中是可以通过的

实际上,cube的维度,status,每个status状态都会有一个统计值

areaid|orderstatus|cnts|
------|-----------|----|
1540  |ORDER_YCGB |701 |
1540  |ORDER_YWC  |396 |
361   |ORDER_YCGB |3   |
361   |ORDER_YWC  |2   |

 

你可能感兴趣的:(大数据)