Skip to content

[SPARK-50686][SQL] Hash to sort aggregation fallback - memory usage optimization #51290

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

Open
wants to merge 3 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

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