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

Julian Hyde commented on HIVE-8988:
-----------------------------------

I am a bit surprised that translating GROUPING__ID to Calcite's GROUP_ID 
function works. The logic to expand it is in SqlToRelConverter, which Hive does 
not call (IIRC). How does it work?

You don't need to call BitSets.toIter anymore. ImmutableBitSet implements 
Iterable (BitSet, which we used to use for Aggregate.groupKeys, does not).

For {{ImmutableBitSet convert(int value)}}, I'll add 
ImmutableBitSet.valueOf(long...). valueOf(x) would be equivalent to convert(x). 
You can migrate to it in a future version of Calcite, if you like.

> Support advanced aggregation in Hive to Calcite path 
> -----------------------------------------------------
>
>                 Key: HIVE-8988
>                 URL: https://issues.apache.org/jira/browse/HIVE-8988
>             Project: Hive
>          Issue Type: Improvement
>    Affects Versions: 0.15.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>              Labels: grouping, logical, optiq
>             Fix For: 0.15.0
>
>         Attachments: HIVE-8988.patch
>
>
> To close the gap between Hive and Calcite, we need to support the translation 
> of GroupingSets into Calcite; currently this is not implemented.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to