[
https://issues.apache.org/jira/browse/CALCITE-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14204883#comment-14204883
]
Vladimir Sitnikov commented on CALCITE-370:
-------------------------------------------
What is the purpose of {{GroupingType}}?
How are you going to support {{GROUPING SETS ((X, Y), (Z), (Y), ())}}?
What would be the value of {{groupingType}}?
What is the preferred implementation approach?
"implementations that cannot implement grouping sets throw
HaveNoIdeaHowToImplement" and "some Calcite rule rewrites grouping sets to a
set of unions and retries"? (e.g. something similar to {{avg(..)}})
> Support GROUPING SETS in SQL and algebra
> ----------------------------------------
>
> Key: CALCITE-370
> URL: https://issues.apache.org/jira/browse/CALCITE-370
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Assignee: Julian Hyde
>
> Support grouping sets in the relational algebra. This feature would add a new
> field, groupKeys, to aggregate rel that has a set of bit maps, each of which
> has a grouping key.
> For example, if 'group by x, y, z' is represented by
> {code}
> AggregateRel(groupSet={0, 1, 2})
> {code}
> then 'group by grouping sets (x, y, z), (y, z), ()' would be represented by
> {code}
> AggregateRel(groupSet={0, 1, 2}, groupSets=[ {0, 1, 2}, {1, 2}, {} ])
> {code}
> A regular group by, or a group by with a singleton grouping set, would have
> groupSets = null.
> If groupSets is present, the returned row type would include an indicator
> column for each grouping key.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)