File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
datafusion/physical-plan/src/repartition Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -382,7 +382,7 @@ impl RepartitionExecState {
382382 txs,
383383 partitioning. clone ( ) ,
384384 metrics,
385- // preserve_order depends on input partition to start from 0
385+ // preserve_order depends on partition index to start from 0
386386 if preserve_order { 0 } else { i } ,
387387 num_input_partitions,
388388 ) ) ;
@@ -443,8 +443,7 @@ impl BatchPartitioner {
443443 num_partitions,
444444 // Distribute starting index evenly based on input partition, number of input partitions and number of partitions
445445 // to avoid they all start at partition 0 and heavily skew on the lower partitions
446- next_idx : ( ( input_partition * num_partitions) / num_input_partitions)
447- % num_partitions,
446+ next_idx : ( ( input_partition * num_partitions) / num_input_partitions) ,
448447 }
449448 }
450449 Partitioning :: Hash ( exprs, num_partitions) => BatchPartitionerState :: Hash {
You can’t perform that action at this time.
0 commit comments