-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-48307][SQL][FOLLOWUP] not-inlined CTE references sibling should not fail #47141
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
Conversation
| plan match { | ||
| case WithCTE(child, cteDefs) => | ||
| val remainingDefs = cteDefs.filter { cteDef => | ||
| val notInlined = mutable.ArrayBuffer.empty[CTERelationDef] |
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 is also the behavior of the previous code.
sql/core/src/test/scala/org/apache/spark/sql/CTEInlineSuite.scala
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| test("SPARK-48307: not-inlined CTE references sibling") { | ||
| withTempView("t") { |
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 can't find where you create or use this view
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.
ah I copied it from other test but didn't end up using it. Let me remove
|
thanks for the review, merging to master! |
amaliujia
left a comment
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.
Late LGTM thanks!
viirya
left a comment
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.
Looks good.
What changes were proposed in this pull request?
This is a follow-up of #46617 to fix a bug. When we re-construct the
WithCTEnode, we should use the new CTE definitions that have been appliedinlineCTE.Why are the changes needed?
bug fix, otherwise we may hit errors such as
Does this PR introduce any user-facing change?
no, the bug is not released yet
How was this patch tested?
new test
Was this patch authored or co-authored using generative AI tooling?
no