You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/05/26 17:07:15 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #6449: Propagate panics

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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org