Skip to content

feat: Eagerly drop last finished stream in FusedStreams#23283

Merged
rluvaton merged 2 commits into
apache:mainfrom
rluvaton:drop-finished-stream-in-fused-sort
Jul 3, 2026
Merged

feat: Eagerly drop last finished stream in FusedStreams#23283
rluvaton merged 2 commits into
apache:mainfrom
rluvaton:drop-finished-stream-in-fused-sort

Conversation

@rluvaton

@rluvaton rluvaton commented Jul 1, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

N/A

Rationale for this change

Drop finished stream that might hold on memory, this will reduce merge sort memory that one of the stream hold on memory reservation

What changes are included in this PR?

replaced finished stream in FusedStreams with EmptyRecordBatchStream once finished

Are these changes tested?

yes

Are there any user-facing changes?

no

@github-actions github-actions Bot added the physical-plan Changes to the physical-plan crate label Jul 1, 2026

@EmilyMatt EmilyMatt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, LGTM

@alamb alamb changed the title feat: drop last finished stream in FusedStreams feat: Eagerly drop last finished stream in FusedStreams Jul 3, 2026

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me -- thank you @rluvaton and @EmilyMatt

@rluvaton rluvaton added this pull request to the merge queue Jul 3, 2026
Merged via the queue into apache:main with commit 8155cb7 Jul 3, 2026
39 checks passed
@rluvaton rluvaton deleted the drop-finished-stream-in-fused-sort branch July 3, 2026 13:53
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.

3 participants