Skip to content

Split BatchPartitioner::try_new(..) into BatchPartitioner::new_hash and BatchPartitioner::new_round_robin #19664

@milenkovicm

Description

@milenkovicm

as part of #18880 BatchPartitioner try_new method got two additional parameters, which are only relevant for round_robin partitioning

-       let mut partitioner =
-            BatchPartitioner::try_new(partitioning, metrics.repartition_time.clone())?;
+        let mut partitioner = BatchPartitioner::try_new(
+           partitioning,
+           metrics.repartition_time.clone(),
+           input_partition,
+            num_input_partitions,
+        )?;

As those two new parameters are only relevant for round robin, it would make sense splitting the method.

Sorry I'm a bit late with my comment. I've stumbled upon this change updating ballista. Its a bit confusing change from usage perspective, there are two parameters which are used only in round robin case, would it make sense splitting try_new method in try_new_hash and try_new_round_robin?

Originally posted by @milenkovicm in #18880 (comment)

cc: @alamb, @Dandandan

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions