Skip to content

feat: make BatchPartitioner::partition_iter public#21341

Merged
alamb merged 2 commits intoapache:mainfrom
hcrosse:public-partition-iter
Apr 3, 2026
Merged

feat: make BatchPartitioner::partition_iter public#21341
alamb merged 2 commits intoapache:mainfrom
hcrosse:public-partition-iter

Conversation

@hcrosse
Copy link
Copy Markdown
Contributor

@hcrosse hcrosse commented Apr 3, 2026

Which issue does this PR close?

Rationale for this change

BatchPartitioner::partition_iter is already used internally as the core implementation behind the public partition method, and was intentionally factored out to support both sync and async consumption patterns. However, since it's private, downstream crates like Ballista can't use the iterator directly and are forced to run both CPU-bound partitioning and I/O together in a sync closure.

What changes are included in this PR?

Changed partition_iter visibility from private to public.

Are these changes tested?

The existing tests for BatchPartitioner cover partition_iter indirectly through the partition method, which delegates to it. No behavioral change was made.

Are there any user-facing changes?

BatchPartitioner::partition_iter is now part of the public API. This is a purely additive change with no breaking impact.

Expose the existing partition_iter method so downstream async consumers
can separate CPU-bound partitioning from I/O.

Closes apache#21311
@github-actions github-actions bot added the physical-plan Changes to the physical-plan crate label Apr 3, 2026
@alamb
Copy link
Copy Markdown
Contributor

alamb commented Apr 3, 2026

Looks good to me -- thank you @hcrosse

@alamb alamb enabled auto-merge April 3, 2026 15:09
@alamb
Copy link
Copy Markdown
Contributor

alamb commented Apr 3, 2026

Enabled auto merge so we can test out the merge queue

@alamb alamb added this pull request to the merge queue Apr 3, 2026
Merged via the queue into apache:main with commit 3f475b1 Apr 3, 2026
34 of 35 checks passed
@alamb
Copy link
Copy Markdown
Contributor

alamb commented Apr 3, 2026

@blaginin FYI I tried the merge queue on this PR and it seems like it just merged directly (didn't wait for the checks 🤔 )

@blaginin
Copy link
Copy Markdown
Member

blaginin commented Apr 3, 2026

it worked, it was very fast 😅

image

@alamb
Copy link
Copy Markdown
Contributor

alamb commented Apr 3, 2026

573567179-f08a3c78-6533-438f-8377-eb81dbcbe2a0

@blaginin
Copy link
Copy Markdown
Member

blaginin commented Apr 3, 2026

Right! In this list you see two types of actions:

  • "merge group" - those are ran the merge queue. Currently, we only have dev.yml checks there
  • "push" the normal "old" CI on every push to develop. After the Merge Queue has worked. Those check involve rust.yml, dev.yml, extended.yml and trigger on every commit (that's why you see "pending" now)

@blaginin
Copy link
Copy Markdown
Member

blaginin commented Apr 3, 2026

IMG_6113

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.

Make BatchPartitioner::partition_iter public for downstream async consumers

3 participants