gene-bordegaray commented on code in PR #23231:
URL: https://github.com/apache/datafusion/pull/23231#discussion_r3538778340


##########
datafusion/physical-plan/src/repartition/mod.rs:
##########
@@ -1642,33 +1753,12 @@ impl RepartitionExec {
         input_partition: usize,
         num_input_partitions: usize,
     ) -> Result<()> {
-        let mut partitioner = match &partitioning {
-            Partitioning::Hash(exprs, num_partitions) => {
-                BatchPartitioner::new_hash_partitioner(
-                    exprs.clone(),
-                    *num_partitions,
-                    metrics.repartition_time.clone(),
-                )?
-            }
-            Partitioning::RoundRobinBatch(num_partitions) => {
-                BatchPartitioner::new_round_robin_partitioner(
-                    *num_partitions,
-                    metrics.repartition_time.clone(),
-                    input_partition,
-                    num_input_partitions,
-                )
-            }
-            Partitioning::Range(_) => {
-                // Range repartition execution is tracked in
-                // https://github.com/apache/datafusion/issues/22397
-                return not_impl_err!(
-                    "Range partitioning execution is not implemented by 
RepartitionExec"
-                );
-            }
-            other => {
-                return not_impl_err!("Unsupported repartitioning scheme 
{other:?}");
-            }
-        };
+        let mut partitioner = BatchPartitioner::try_new(
+            partitioning,
+            metrics.repartition_time.clone(),
+            input_partition,
+            num_input_partitions,
+        )?;

Review Comment:
   wowzer thats pretty good 👍 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to