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


##########
datafusion/core/src/physical_plan/file_format/csv.rs:
##########
@@ -252,7 +252,13 @@ pub async fn plan_to_csv(
                 });
                 tasks.push(handle);
             }
-            futures::future::join_all(tasks).await;
+            let results = futures::future::join_all(tasks).await;
+            for result in results {
+                let result =
+                    result.map_err(|e| 
DataFusionError::Execution(format!("{}", e)))?;
+                let _ =
+                    result.map_err(|e| 
DataFusionError::Execution(format!("{}", e)))?;
+            }

Review Comment:
   I think we can use `try_for_each` from 
https://docs.rs/futures-util/0.3.24/futures_util/stream/trait.TryStreamExt.html#method.try_for_each



-- 
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-unsubscr...@arrow.apache.org

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

Reply via email to