apache / apache/datafusion

perf: coalesce single-column sort runs to cut merge fan-in

Open
#23,208 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

### Is your feature request related to a problem or challenge?

Columns that exceed the threshold are merged using merge.
This causes a lot of small sort runs to be merged, which is slower than larger runs.
For multi column the tradeoff is different as multi row sort using lexsort_to_indices is slower.

### Describe the solution you'd like

Coalesce single columns until the threshold (1MiB by default)

_No response_

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

No file or test is named. Start by locating the merge path for sort runs that exceed the 1 MiB threshold and compare the single-column and multi-column cases. Done means single-column runs are coalesced up to the threshold while preserving the existing multi-column tradeoff and reducing merge fan-in.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.