[
https://issues.apache.org/jira/browse/TRAFODION-2312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15645249#comment-15645249
]
Anoop Sharma commented on TRAFODION-2312:
-----------------------------------------
In addition to GROUPING, also add support for GROUPING_ID function.
GROUPING functions returns a 1 or 0 depending on whether a null
value was moved as a rollup group or not.
GROUPING_ID(a,b,c) returns a value corresponding to the bit vector
where each bit entry represents the GROUPING result for the argument
of GROUPING_ID function.
For ex: GROUPING_ID(a,b,c) will have 3 bit entries,
and is equivalent to:
GROUPING(a)*4 + GROUPING(b)*2 + GROUPING(c)*1
> Add support for GROUPING function for rollup aggregation
> --------------------------------------------------------
>
> Key: TRAFODION-2312
> URL: https://issues.apache.org/jira/browse/TRAFODION-2312
> Project: Apache Trafodion
> Issue Type: New Feature
> Reporter: Anoop Sharma
> Assignee: Anoop Sharma
> Priority: Minor
>
> GROUP BY ROLLUP aggregation generates and returns a null value to
> represent a rollup group.
> See jira trafodion-2246 for ROLLUP details.
> This current jira is an extension of it.
> GROUPING function is used to determine whether a returned null value
> is due to a rollup group.
> It returns '1' if a null value is a rollup null and '0' otherwise (for
> non-null
> or data null values).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)