spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "cen yuhai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-22748) Error in query: grouping_id() can only be used with GroupingSets/Cube/Rollup;
Date Sun, 10 Dec 2017 11:55:00 GMT

    [ https://issues.apache.org/jira/browse/SPARK-22748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16285210#comment-16285210
] 

cen yuhai commented on SPARK-22748:
-----------------------------------

 your sql is ok

> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message