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.
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
[SPARK-41631][SQL] Support implicit lateral column alias resolution on Aggregate #39040
[SPARK-41631][SQL] Support implicit lateral column alias resolution on Aggregate #39040
Changes from 30 commits
04959c2
6f44c85
725e5ac
660e1d2
fd06094
7d4f80f
b9704d5
777f13a
09480ea
c972738
97ee293
5785943
757cffb
29de892
72991c6
d45fe31
1f55f73
f753529
b9f706f
94d5c9e
d2e75fd
edde37c
fb7b18c
3698cff
e700d6a
8d20986
d952aa7
44d5a3d
ccebc1c
5540b70
338ba11
136a930
5076ad2
2f2dee5
3a5509a
a23debb
b200da0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
There is reorder: https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala#L483
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.
I surprisingly found out that this existing query can't analyze:
Seems in our checkAnalysis, we don't canonicalize to compare the expressions. It is structured as (1 + dept) + 10, and can't match the grouping expression (dept + 10).
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.
No need. All the results from
resolveOperatorsUpWithPruning
will havewithOrigin
around it.