NoahKusaba commented on PR #142:
URL: 
https://github.com/apache/datafusion-iceberg/pull/142#issuecomment-7152207043

   One thing about the default of `data_file_concurrency_limit = 1`: a lazy 
scan has a single output partition, so with this default it reads every data 
file one after another. That has been true since #113 moved the limit into 
`IcebergDataSource::builder`; before that, the source called 
`TableScan::to_arrow`, which reads up to one file per CPU at once.
   
   I checked this on main (9381791) with a storage wrapper that adds 20 ms to 
each data-file read and records how many files have reads in flight at once, 
over the 7-file taxi table:
   
   | Scan | Most files read at once |
   | --- | --- |
   | `SELECT * FROM taxi` through `IcebergStaticTableProvider` (lazy, default 
reader) | 1 |
   | Same lazy scan, with `with_reader` and the limit unset | 7 |
   | `TableScan::to_arrow` (what the source called before #113) | 7 |
   
   The limit of one makes sense for eager scans spread over 
`target_partitions`, but for the default lazy mode it makes object-store reads 
serial. Could the default stay unset (Iceberg's per-CPU default) when the scan 
has one partition, or at least for lazy scans until #84 lands? Making it an 
`Option<usize>` in the config would also let users ask for Iceberg's default 
explicitly.
   
   (I ran into this in Ballista, where every Iceberg scan is lazy, and we now 
pass our own reader with the limit unset.)
   


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