[ https://issues.apache.org/jira/browse/HIVE-8988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14244400#comment-14244400 ]
Julian Hyde commented on HIVE-8988: ----------------------------------- It looks just like a function with no arguments, so Calcite will treat accordingly. You can't translate to grouping_id because that's a pseudo function too. Safest might be to translate it to {{$Foo(i0, i1, i2, i3, ...)}} where i<i>n</i> are the indicator columns, and look for it afterwards. The column references will prevent it from being pushed down. Putatively $Foo would expand to {{i0 + 2 * i1 + 4 * i2 + ...}} (in fact the same logic that SqlToRelConverter translates GROUP_ID to) but it will be substituted before that ever happens. > 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.01.patch, HIVE-8988.patch > > > CLEAR LIBRARY CACHE > 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)