-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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-27561][SQL][FOLLOWUP] Move the two rules for Later column alias into one file #39054
Conversation
import org.apache.spark.sql.internal.SQLConf | ||
|
||
/** | ||
* This rule is the second phase to resolve lateral column alias. | ||
* The first phase to resolve lateral column alias. |
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.
It is more clear to put the comment in the first phase rule
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.
If this is a follow-up for SPARK-27561, the original PR (#39040) is not merged yet. Could you make a PR to him in order to commit as a single patch, @gengliangwang ?
@dongjoon-hyun This one is follow-up of #38776. It doesn't contains the code changes of #39040 |
Then, let me revise the title of #39040 . |
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.
+1, LGTM. Merged to master.
Thank you for clarification, @gengliangwang .
This PR changes to use the resolver from the SimpleAnalyzer, which is always case sensitive one instead of the one that is determined by conf. This will cause lca unable to resolve case insensitive alias. I fix this issue in the new pr 136a930 by refactoring the code. |
Could you make a PR, @anchovYu ? |
…s into one file ### What changes were proposed in this pull request? Move the two rules `WrapLateralColumnAliasReference` and `ResolveLateralColumnAliasReference` into one file `ResolveLateralColumnAlias.scala`, instead of one rule in `Analyzer.scala` and the other one in another file. Also update the code comments. ### Why are the changes needed? Found this issue during reviewing apache#39040 This refactor should make the code easier to read and review. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Existing UT Closes apache#39054 from gengliangwang/refactorLCA. Authored-by: Gengliang Wang <gengliang@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Since this PR introduced a regression (case insensitive problem) and it's actually not necessary after my refactor #38888 , I'm reverting it. |
Reverted at 52082d3 |
What changes were proposed in this pull request?
Move the two rules
WrapLateralColumnAliasReference
andResolveLateralColumnAliasReference
into one fileResolveLateralColumnAlias.scala
, instead of one rule inAnalyzer.scala
and the other one in another file.Also update the code comments.
Why are the changes needed?
Found this issue during reviewing #39040
This refactor should make the code easier to read and review.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Existing UT