GitHub user jiangxb1987 opened a pull request:

    [SPARK-17868][SQL] Do not use bitmasks during parsing and analysis of 

    ## What changes were proposed in this pull request?
    We generate bitmasks for grouping sets during the parsing process, and use 
these during analysis. These bitmasks are difficult to work with in practice 
and have lead to numerous bugs. This PR removes these and use actual sets 
instead, however we still need to generate these offsets for the grouping_id.
    This PR does the following works:
    1. Replace bitmasks by actual grouping sets durning Parsing/Analysis stage 
    2. Add new testsuite `ResolveGroupingAnalyticsSuite` to test the 
`Analyzer.ResolveGroupingAnalytics` rule directly;
    3. Fix a minor bug in `ResolveGroupingAnalytics`.
    ## How was this patch tested?
    By existing test cases, and add new testsuite 
`ResolveGroupingAnalyticsSuite` to test directly.

You can merge this pull request into a Git repository by running:

    $ git pull group-set

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #15484
commit 0053da882b46635f67ed5012eea054a55def087b
Author: jiangxingbo <>
Date:   2016-10-13T14:01:26Z

    remove bitmasks for grouping sets and use actual sets instead.

commit e2c89aa2430f9d11119159edd983fb49009f4410
Author: jiangxingbo <>
Date:   2016-10-14T13:21:01Z

    update testcases.

commit 776d32e4ea5a92eda215e06ac32166cb9dda4f1f
Author: jiangxingbo <>
Date:   2016-10-14T13:51:41Z

    update comments.


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to