DRILL-3962: Add Support For ROLLUP, CUBE, GROUPING SETS, GROUPING, GROUPING_ID, GROUP_ID#3026
Merged
cgivre merged 9 commits intoapache:masterfrom Oct 24, 2025
Merged
DRILL-3962: Add Support For ROLLUP, CUBE, GROUPING SETS, GROUPING, GROUPING_ID, GROUP_ID#3026cgivre merged 9 commits intoapache:masterfrom
cgivre merged 9 commits intoapache:masterfrom
Conversation
rymarm
requested changes
Oct 16, 2025
Member
rymarm
left a comment
There was a problem hiding this comment.
Hi @cgivre, I think it would be a good idea to split code from a single method for hundreds of rows into separate helper methods to improve code readability and maintainability. Please check my comments.
The overall change looks good to me, thank you for this!
Contributor
Author
|
@rymarm Thanks for the review. I addressed all your comments. |
rymarm
reviewed
Oct 20, 2025
Contributor
Author
|
Thanks @rymarm for the review! |
cgivre
added a commit
to cgivre/drill
that referenced
this pull request
Mar 25, 2026
…OUPING_ID, GROUP_ID (apache#3026)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DRILL-3962: Add Support For ROLLUP, CUBE, GROUPING SETS, GROUPING, GROUPING_ID, GROUP_ID
Description
In recent versions of SQL, there are several aggregates which create different summaries of the aggregate data.
Specifically, this PR adds support for:
GROUPING SETSROLLUPCUBEGROUPING()GROUPING_ID()GROUP_ID()Documentation
GROUPING SETS:
GROUPING SETSallows you to define multiple independent groupings within a singleGROUP BYquery. Instead of writing separate queries for each aggregation, you can specify different column combinations to produce multiple summary results at once. It gives you fine-grained control over which subtotals are calculated.ROLLUP
ROLLUPgenerates hierarchical aggregations that move from detailed data to higher-level summaries. For example, aROLLUPon (year, month, day) produces totals by day, month, year, and an overall grand total. It’s ideal for creating reports with cumulative subtotals.CUBE
CUBEcreates aggregations for all possible combinations of the specified columns. It’s useful for multidimensional analysis, such as computing totals across every dimension and their intersections. This produces the most comprehensive summary of the data.Testing
Created additional unit tests.