thinkharderdev commented on issue #2110: URL: https://github.com/apache/arrow-rs/issues/2110#issuecomment-1190631462
@tustvold Ok, I understand why you were worried about contention. Sine we're dealing with `AsyncFileRead` we need a mutable reference so if we were to do this in `arrow-rs` we would need to wrap it in an `Arc<Mutex<>>` which entirely defeats the purpose... Instead what if we add ``` pub trait AsyncFileReader { fn get_byte_ranges(&mut self, ranges: Vec<Range<usize>>) -> BoxFuture<'_, Result<Vec<Bytes>>>; } ``` This makes things quite straightforward in `ParquetRecordBatchStream` and we can just delegate handling of parallelism (if any) to the implementer? -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org