Skip to content

perf: passthrough last stream is SortPreservingMergeStream#23699

Draft
rluvaton wants to merge 1 commit into
apache:mainfrom
rluvaton:passthrough-last-stream-in-sort-preserving-merge-stream
Draft

perf: passthrough last stream is SortPreservingMergeStream#23699
rluvaton wants to merge 1 commit into
apache:mainfrom
rluvaton:passthrough-last-stream-in-sort-preserving-merge-stream

Conversation

@rluvaton

@rluvaton rluvaton commented Jul 19, 2026

Copy link
Copy Markdown
Member

TODO - fill this + add benchmark where SortExec reach to a point that we spilled 99% of data and then we create another spill file with 1% of data

Which issue does this PR close?

N/A

Rationale for this change

When we sort n streams and only 1 stream left we can avoid the whole loser tree + RecordBatchBuilder interleave call

What changes are included in this PR?

  • TODO - fill this

Are these changes tested?

Need to add some test for this case

Are there any user-facing changes?

Just making it faster


Waiting for this pr to be fixed before so we won't introduce memory issues:

@github-actions github-actions Bot added the physical-plan Changes to the physical-plan crate label Jul 19, 2026
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.

1 participant