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-50686][SQL] Hash to sort aggregation fallback - memory usage optimization #49314

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

akupchinskiy
Copy link

What changes were proposed in this pull request?

Added deallocation of internal array which is redundant in certain hash to sort aggregation fallback scenarios

Why are the changes needed?

Under memory pressure, allocation of new internal structures is oom-prone. So, it is better to get rid of all the redundant structures at that point to reduce the risk.

Does this PR introduce any user-facing change?

No

How was this patch tested?

UnsafeKVExternalSuite spilling tests have been adjusted to the reduced spilled memory introduced by the change.

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

No

@akupchinskiy akupchinskiy changed the title Aggregation memory usage optimization [SPARK-50686][SQL] Hash to sort aggregation fallback - memory usage optimization Dec 27, 2024
…n fallback scenario

adjust expected spill values in tests
@akupchinskiy akupchinskiy force-pushed the aggregation-memory-usage-optimization branch from 6f526e8 to e6b8e8e Compare December 27, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant