vustef commented on code in PR #2342:
URL: https://github.com/apache/iceberg-rust/pull/2342#discussion_r3107285369
##########
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:
Thanks for the detailed answer. Don't get me wrong, I'd love to see this in
- in fact, in our fork we rely on this parallel behaviour since we still
haven't switched our engine to Renjie's suggestion.
My change was before #2020, so it might be that things have changed since
then. My impression then wasn't that a concern was that partitioned readers
wouldn't get concurrency==1, but that we didn't want `to_arrow()` to behave
like an parallel engine for scanning Iceberg, but keep it as a low-level API.
If I was wrong, then something like #2020 would've been a very easy change for
me back then :)
That said, it is indeed confusing then why it does have
`concurrency_limit_data_files` at all.
If you're allowed to proceed with the change (🤞 ), then I have one comment
(as a separate comment).
--
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]