[FEAT] [SQL] Add global agg support for SQL #2799
Merged
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.
This adds support to SQL to run global aggregation when there are only aggregations and no group by, which is inline with many other SQL implementations.
It is similar in nature to #1979, but specific to SQL - depending on how that issue is resolved the SQL planner code here could be redundant.
Example:
note: I know the SQL support is new, so sorry if this is jumping the gun! Is it better to first create discussions or issues for this kind of change? I've been looking forward to SQL in this project and from playing around with using sqlglot on the python side to build a logical plan, I noticed a few things - now that this is here I thought I might contribute 😄