Skip to content

Conversation

@tustvold
Copy link
Contributor

Which issue does this PR close?

Closes #2285

Rationale for this change

Extracts common logic so it can be used by RepartitionExec, Ballista and #2226

What changes are included in this PR?

Adds a [BatchPartitioner] that contains the logic for partitioning batches

Are there any user-facing changes?

No

///
/// The time spent repartitioning will be recorded to `timer`
pub fn new(partitioning: Partitioning, timer: metrics::Time) -> Self {
pub fn new(partitioning: Partitioning, timer: metrics::Time) -> Result<Self> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn´t this be try_new now by convention?

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

Nice cleanup. Thanks @tustvold

@Dandandan Dandandan merged commit 583b4ab into apache:master Apr 20, 2022
@Dandandan
Copy link
Contributor

Thanks @tustvold 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract Reusable BatchPartitioner

3 participants