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

Zhen Chen commented on CALCITE-4649:
------------------------------------

I'm not sure if CALCITE-7116 has accomplished this, but if it has, I think we 
can close this JIRA.

> Add AggregateExpandGroupingSetsRule, a planner rule that removes GROUPING SETS
> ------------------------------------------------------------------------------
>
>                 Key: CALCITE-4649
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4649
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Priority: Major
>
> Add {{class AggregateExpandGroupingSetsRule}}, a planner rule that removes 
> {{GROUPING SETS}}.
> Some databases do not support {{GROUPING SETS}}. (For example, BigQuery 
> supports {{GROUP BY ROLLUP}} but not general {{GROUPING SETS}}.) But 
> {{GROUPING SETS}} is a useful construct, increasingly used in user SQL, and 
> also generated by rules (e.g. {{AggregateExpandWithinDistinctRule}}).
> The proposed rule would match an {{Aggregate}} whose {{groupSets}} field has 
> more than one element, and would convert it to an {{Aggregate}} over a 
> {{Join}} whose right-hand side is a list of integers, the group ids active in 
> the query. Calls to the {{GROUP_ID}} field would be replaced by references to 
> the group id column.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to