-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-47241][SQL][FOLLOWUP] Fix issue when laterally referencing a Generator
#50310
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-47241][SQL][FOLLOWUP] Fix issue when laterally referencing a Generator
#50310
Conversation
bc0c013 to
70c6828
Compare
70c6828 to
5ab688f
Compare
| sql("select 1 as a, a").queryExecution.assertAnalyzed() | ||
| } | ||
|
|
||
| test("SPARK-49349: Improve error message for LCA with Generate") { |
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.
This test now passes so refactoring it a bit
|
This is a partial revert of #45350 . I don't quite like this fix, but seems this is the only way to fix the conflicts between two rules.
Now we relax the trigger condition of rule |
|
thanks, merging to master/4.0/3.5! |
…Generator` ### What changes were proposed in this pull request? Fix issue when laterally referencing a `Generator`. ### Why are the changes needed? Fix the following query pattern: ``` WITH cte AS (SELECT EXPLODE(ARRAY(1, 2, 3)) AS c1, c1) SELECT * FROM cte ``` ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Added a test case to `LateralColumnAliasSuite` ### Was this patch authored or co-authored using generative AI tooling? No Closes #50310 from mihailotim-db/mihailotim-db/generator_lca. Authored-by: Mihailo Timotic <[email protected]> Signed-off-by: Wenchen Fan <[email protected]> (cherry picked from commit 62c0669) Signed-off-by: Wenchen Fan <[email protected]>
…Generator` Fix issue when laterally referencing a `Generator`. Fix the following query pattern: ``` WITH cte AS (SELECT EXPLODE(ARRAY(1, 2, 3)) AS c1, c1) SELECT * FROM cte ``` No Added a test case to `LateralColumnAliasSuite` No Closes #50310 from mihailotim-db/mihailotim-db/generator_lca. Authored-by: Mihailo Timotic <[email protected]> Signed-off-by: Wenchen Fan <[email protected]> (cherry picked from commit 62c0669) Signed-off-by: Wenchen Fan <[email protected]>
…Generator` ### What changes were proposed in this pull request? Fix issue when laterally referencing a `Generator`. ### Why are the changes needed? Fix the following query pattern: ``` WITH cte AS (SELECT EXPLODE(ARRAY(1, 2, 3)) AS c1, c1) SELECT * FROM cte ``` ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Added a test case to `LateralColumnAliasSuite` ### Was this patch authored or co-authored using generative AI tooling? No Closes apache#50310 from mihailotim-db/mihailotim-db/generator_lca. Authored-by: Mihailo Timotic <[email protected]> Signed-off-by: Wenchen Fan <[email protected]> (cherry picked from commit 3fb6549) Signed-off-by: Wenchen Fan <[email protected]>
What changes were proposed in this pull request?
Fix issue when laterally referencing a
Generator.Why are the changes needed?
Fix the following query pattern:
Does this PR introduce any user-facing change?
No
How was this patch tested?
Added a test case to
LateralColumnAliasSuiteWas this patch authored or co-authored using generative AI tooling?
No