andygrove commented on a change in pull request #9099:
URL: https://github.com/apache/arrow/pull/9099#discussion_r552012528



##########
File path: rust/datafusion/src/physical_plan/parquet.rs
##########
@@ -256,16 +257,21 @@ impl ExecutionPlan for ParquetExec {
         let projection = self.projection.clone();
         let batch_size = self.batch_size;
 
-        thread::spawn(move || {
-            if let Err(e) = read_files(
+        task::spawn_blocking(move || {
+            read_files(
                 &filenames,
                 projection.clone(),
                 batch_size,
                 response_tx.clone(),
-            ) {
-                println!("Parquet reader thread terminated due to error: 
{:?}", e);
-            }
-        });
+            )
+        })
+        .await

Review comment:
       I think this will lead to deadlock because the channel's buffer will 
fill up and the reader won't be able to push new batches. The caller can't read 
any batches from the channel until this task completes?




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to