cen yuhai created SPARK-22748: --------------------------------- Summary: Error in query: grouping_id() can only be used with GroupingSets/Cube/Rollup; Key: SPARK-22748 URL: https://issues.apache.org/jira/browse/SPARK-22748 Project: Spark Issue Type: Bug Components: SQL Affects Versions: 2.3.0 Reporter: cen yuhai
sql {code} 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)) {code} Exception {code} 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 {code} this is a FOLLOW-UP issue of #SPARK-21055 -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org