-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-54905][SQL] Simplify foreachWithSubqueries implementation in QueryPlan #53681
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
JIRA Issue Information=== Sub-task SPARK-54905 === This comment was automatically generated by GitHub Actions |
8c18ce2 to
3e962d1
Compare
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/QueryPlan.scala
Outdated
Show resolved
Hide resolved
5b45be0 to
d17748c
Compare
10f10da to
b94fa1a
Compare
|
Discussed with @cloud-fan offline, while the current convention is to let TreeNode methods to handle plan traversal logic (including withPruning), for |
|
thanks, merging to master! |
What changes were proposed in this pull request?
This PR simplifies the foreachWithSubqueries method in QueryPlan.scala by:
Why are the changes needed?
The original implementation was unnecessarily complex, using foreach to traverse children implicitly while recursively calling foreachWithSubqueries for subqueries. The new implementation is simpler and more straightforward.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Existing tests for query plan traversal should cover this change.
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Cursor 2.2.44