vustef commented on code in PR #2342:
URL: https://github.com/apache/iceberg-rust/pull/2342#discussion_r3106732731


##########
crates/iceberg/src/arrow/reader.rs:
##########
@@ -281,16 +282,25 @@ impl ArrowReader {
                 tasks
                     .map_ok(move |task| {
                         let file_io = file_io.clone();
+                        let delete_file_loader = 
self.delete_file_loader.clone();
+
+                        async move {
+                            let stream = Self::process_file_scan_task(
+                                task,
+                                batch_size,
+                                file_io,
+                                delete_file_loader,
+                                row_group_filtering_enabled,
+                                row_selection_enabled,
+                                parquet_read_options,
+                            )
+                            .await?;
 
-                        Self::process_file_scan_task(
-                            task,
-                            batch_size,
-                            file_io,
-                            self.delete_file_loader.clone(),
-                            row_group_filtering_enabled,
-                            row_selection_enabled,
-                            parquet_read_options,
-                        )
+                            // Spawn stream consumption onto a separate tokio 
task so that
+                            // CPU-heavy Parquet decompression runs on the 
tokio thread pool
+                            // rather than being serialized on the polling 
thread.
+                            Ok(Self::spawn_record_batch_stream(stream, 1))

Review Comment:
   I believe this is similar to the idea that I had a couple of months back, 
this is @liurenjie1024's feedback: 
https://github.com/apache/iceberg-rust/pull/1684#issuecomment-3346233140



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to