alamb commented on a change in pull request #9106:
URL: https://github.com/apache/arrow/pull/9106#discussion_r552215633



##########
File path: rust/datafusion/src/physical_plan/repartition.rs
##########
@@ -138,8 +138,8 @@ impl ExecutionPlan for RepartitionExec {
                     }
 
                     // notify each output partition that this input partition 
has no more data
-                    for i in 0..num_output_partitions {
-                        let tx = &mut channels[i].0;
+                    for channel in 
channels.iter_mut().take(num_output_partitions) {

Review comment:
       This can probably be even simpler as I think `channels` always has 
`num_output_partitions` elemements: 
   ```suggestion
                       for channel in channels.iter_mut() {
   ```
   
   But this PR's code is a correct as what was previously here :)




----------------------------------------------------------------
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.

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


Reply via email to