Skip to content

[branch-56] perf: prune oversized dictionaries before IPC spilling (backport #27015) - #27107

Merged
alamb merged 1 commit into
apache:branch-56from
alamb:alamb/backport-27015
Nov 6, 2026
Merged

alamb merged 1 commit into
apache:branch-56from
alamb:alamb/backport-27015

Conversation

@alamb

@alamb alamb commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Compact dictionary value tables larger than their key arrays before
traversing retained physical children and writing IPC spill files.

## Which issue does this PR close?

- Closes apache#27014

## What changes are included in this PR?

Compaction of dicts if there are more values than indices and tests.

## What is the testing strategy for this PR?

Unit tests

## Are there any user-facing changes?

No user facing changes, just an improvement to reduce I/O and total size
written to disks when spilling.

@alamb

Co-authored-by: Amp <[email protected]>
(cherry picked from commit 6a98807)
@alamb alamb mentioned this pull request Nov 4, 2026
40 of 61 tasks
@github-actions github-actions Bot added the physical-plan Changes to the physical-plan crate label Nov 4, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.47059% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.25%. Comparing base (1635ed9) to head (ee89a4c).

Files with missing lines Patch % Lines
datafusion/physical-plan/src/spill/mod.rs 76.47% 0 Missing and 4 partials ⚠️
Flag Coverage Δ
all-tests 83.25% <76.47%> (-0.01%) ⬇️
sqllogictests 60.68% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@@              Coverage Diff              @@
##           branch-56   #27107      +/-   ##
=============================================
- Coverage      83.25%   83.25%   -0.01%     
=============================================
  Files           1169     1169              
  Lines         474294   474311      +17     
  Branches      474294   474311      +17     
=============================================
+ Hits          394887   394894       +7     
- Misses         55485    55490       +5     
- Partials       23922    23927       +5     
Files with missing lines Coverage Δ
datafusion/physical-plan/src/spill/mod.rs 87.62% <76.47%> (-0.12%) ⬇️

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alamb
alamb merged commit dece2f3 into apache:branch-56 Nov 6, 2026
41 checks passed
@alamb

alamb commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Thank you @brancz and @xudong963

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants