-
Notifications
You must be signed in to change notification settings - Fork 836
feat(query): support GROUP BY GROUPING SETS clause.
#10534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
580e272 to
3f6ffc8
Compare
3f6ffc8 to
b7550f7
Compare
What if the original column has nulls? Seem they share the same hashmap here. |
There are the same when grouping. We can distinguish this two kinds of NULLs by aggregate function If grouping sets make it become NULL,
|
b7550f7 to
56147e1
Compare
sundy-li
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest Looks good to me.
da18f97 to
fe8c493
Compare
fe8c493 to
d5f0ebc
Compare
|
cc @BohuTANG |

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/
Summary
Basic implementation of
GROUP BY GROUPING SETS.Main idea:
Add a new
PhysicalPlan:PhysicalPlan::AggregateExpandand its correspondingTransform:TransformExpandGroupingSets.If the query is a
GROUP BY GROUPING SETSclause,PhysicalPlan::AggregateExpandwill be added to the front ofPhysicalPlan::AggregatePartial. And the plan will be built intoTransformExpandGroupingSets.TransformExpandGroupingSetswill expand the inputDataBlockfor each grouping set. It will fill NULLs if the group-by columns are not found in the grouping set.Tacking in #10492