You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Su Qilong (Jira)" <ji...@apache.org> on 2020/12/15 13:13:00 UTC

[jira] [Reopened] (SPARK-22748) Error in query: grouping_id() can only be used with GroupingSets/Cube/Rollup;

     [ https://issues.apache.org/jira/browse/SPARK-22748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Su Qilong reopened SPARK-22748:
-------------------------------

This issue did not be fixed

> 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
>            Priority: Major
>              Labels: bulk-closed
>
> 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
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org