alamb commented on code in PR #6449:
URL: https://github.com/apache/arrow-datafusion/pull/6449#discussion_r1207075178


##########
datafusion/core/src/physical_plan/coalesce_partitions.rs:
##########
@@ -142,21 +143,22 @@ impl ExecutionPlan for CoalescePartitionsExec {
 
                 // spawn independent tasks whose resulting streams (of batches)
                 // are sent to the channel for consumption.
-                let mut join_handles = Vec::with_capacity(input_partitions);
+                let mut tasks = JoinSet::new();
                 for part_i in 0..input_partitions {
-                    join_handles.push(spawn_execution(
+                    spawn_execution(
+                        &mut tasks,
                         self.input.clone(),
                         sender.clone(),
                         part_i,
                         context.clone(),
-                    ));
+                    );
                 }
 
                 Ok(Box::pin(MergeStream {
                     input: receiver,
                     schema: self.schema(),
                     baseline_metrics,
-                    drop_helper: AbortOnDropMany(join_handles),

Review Comment:
   🤔  it does look like 
https://docs.rs/tokio/latest/tokio/task/struct.JoinSet.html may be a nicer 
alternative to  `AbortOnDrop` -- what do you think @crepererum ?



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

Reply via email to