vustef commented on code in PR #1684:
URL: https://github.com/apache/iceberg-rust/pull/1684#discussion_r2359242503
##########
crates/iceberg/src/arrow/reader.rs:
##########
@@ -148,15 +148,21 @@ impl ArrowReader {
let stream = tasks
.map_ok(move |task| {
let file_io = file_io.clone();
-
- Self::process_file_scan_task(
- task,
- batch_size,
- file_io,
- self.delete_file_loader.clone(),
- row_group_filtering_enabled,
- row_selection_enabled,
- )
+ let delete_file_loader = self.delete_file_loader.clone();
+
+ async move {
+ let file_stream = Self::process_file_scan_task(
+ task,
+ batch_size,
+ file_io,
+ delete_file_loader,
+ row_group_filtering_enabled,
+ row_selection_enabled,
+ ).await?;
+
+ // Convert the stream to run on separate tasks for
parallel processing
+ Ok::<_,
crate::Error>(Self::stream_to_receiver(file_stream))
Review Comment:
instead of this, perhaps we can just wrap this whole block in a task, and
rely that `try_buffer_unordered` would fetch from stream in parallel, as per
https://www.datawill.io/posts/rust-streams-concurrency/. I'm just not sure if
it would parallelize `tasks: FileScanTaskStream`, or the nested `file_stream:
ArrowRecordBatchStream` too.
--
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]