Skip to content

Conversation

@heyihong
Copy link
Contributor

@heyihong heyihong commented Jan 7, 2026

What changes were proposed in this pull request?

This PR simplifies the foreachWithSubqueries method in QueryPlan.scala by:

  1. Directly traversing both subqueries and children using the same traverse function
  2. Replacing the indirect foreach(actualFunc) call with a direct traverse(this) call

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

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

JIRA Issue Information

=== Sub-task SPARK-54905 ===
Summary: Simplify foreachWithSubqueries implementation in QueryPlan
Assignee: None
Status: Open
Affected: ["4.2.0"]


This comment was automatically generated by GitHub Actions

@github-actions github-actions bot added the SQL label Jan 7, 2026
@heyihong heyihong closed this Jan 7, 2026
@heyihong heyihong deleted the SPARK-54905-2 branch January 7, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant