Skip to content
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-48544][SQL] Reduce memory pressure of empty TreeNode BitSets #46919

Closed
wants to merge 2 commits into from

Conversation

n-young-db
Copy link
Contributor

@n-young-db n-young-db commented Jun 7, 2024

What changes were proposed in this pull request?

  • Changed the ineffectiveRules variable of the TreeNode class to initialize lazily. This will reduce unnecessary driver memory pressure.

Why are the changes needed?

  • Plans with large expression or operator trees are known to cause driver memory pressure; this is one step in alleviating that issue.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing UT covers behavior. Outwards facing behavior does not change.

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions bot added the SQL label Jun 7, 2024
Copy link
Contributor

@JoshRosen JoshRosen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

This is a nice optimization and the implementation is consistent with the pattern used for a similar optimization in #46285.

…s/TreeNode.scala

Co-authored-by: Josh Rosen <rosenville@gmail.com>
@JoshRosen JoshRosen closed this in 5a2f374 Jun 10, 2024
@JoshRosen
Copy link
Contributor

Merged to master (4.0.0). Thanks @n-young-db!

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.

2 participants