Skip to content

fix: report correct number of items left in the iterator for IncrementalSortIterator - #25107

Open
rluvaton wants to merge 1 commit into
apache:mainfrom
rluvaton:fix-len-reporting-on-incremental-sort-iterator
Open

fix: report correct number of items left in the iterator for IncrementalSortIterator#25107
rluvaton wants to merge 1 commit into
apache:mainfrom
rluvaton:fix-len-reporting-on-incremental-sort-iterator

Conversation

@rluvaton

@rluvaton rluvaton commented Sep 9, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

N/A

Rationale for this change

size_hint for IncrementalSortIterator returns the initial number of items rather than how many items left in the iterator

What changes are included in this PR?

update size hint to consider the number of elements already produced, impl ExactSizeIterator and added test

What is the testing strategy for this PR?

unit test

Are there any user-facing changes?

no

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

LGTM, my bad 😐

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.

2 participants