Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.3.0
Description
sql
create table temp.test_grouping_replace(a int, b int); select grouping__id from (select a, b, count(1) , grouping__id from temp.test_grouping_replace group by a, b grouping sets(a, b))
Exception
Error in query: grouping_id() can only be used with GroupingSets/Cube/Rollup;; !Project [grouping_id() AS grouping__id#78] +- Aggregate [a#76, b#77, spark_grouping_id#73], [a#76, b#77, count(1) AS count(1)#72L, spark_grouping_id#73 AS grouping__id#71] +- Expand [List(a#69, b#70, a#74, null, 1), List(a#69, b#70, null, b#75, 2)], [a#69, b#70, a#76, b#77, spark_grouping_id#73] +- Project [a#69, b#70, a#69 AS a#74, b#70 AS b#75] +- MetastoreRelation temp, test_grouping_replace
this is a FOLLOW-UP issue of SPARK-21055