Skip to content
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

Add supports for Hive's SELECT ... GROUP BY .. GROUPING SETS syntax #1653

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

wugeer
Copy link
Contributor

@wugeer wugeer commented Jan 9, 2025

This PR supports SELECT ... GROUP BY .. GROUPING SETS syntax for hive dialect. For more information, please refer to:
https://cwiki.apache.org/confluence/display/Hive/Enhanced+Aggregation%2C+Cube%2C+Grouping+and+Rollup#EnhancedAggregation,Cube,GroupingandRollup-GROUPINGSETSclause

Also support hive with rollup/cube clause.
This resolves issue #1644

/// Hive syntax: `SELECT ... GROUP BY .. GROUPING SETS`
///
/// [Hive](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=30151323#EnhancedAggregation,Cube,GroupingandRollup-GROUPINGSETSclause)
pub grouping_sets: Option<Expr>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering is it possible to cover the lacking cases using the group_by property vs introducing a new property? Its not currently clear to me why a new field was introduced.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, another idea is to attribute this situation to the group by property. It may be better. I will try to make it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants