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

Zhen Chen resolved CALCITE-4649.
--------------------------------
    Fix Version/s: 1.41.0
       Resolution: Duplicate

> 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
>             Fix For: 1.41.0
>
>
> 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