You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Dandandan (via GitHub)" <gi...@apache.org> on 2023/02/06 10:14:58 UTC

[GitHub] [arrow-datafusion] Dandandan commented on a diff in pull request #5161: FileStream: Open next file in parallel while decoding

Dandandan commented on code in PR #5161:
URL: https://github.com/apache/arrow-datafusion/pull/5161#discussion_r1097183956


##########
datafusion/core/src/physical_plan/file_format/file_stream.rs:
##########
@@ -98,6 +99,8 @@ enum FileStreamState {
         partition_values: Vec<ScalarValue>,
         /// The reader instance
         reader: BoxStream<'static, Result<RecordBatch, ArrowError>>,
+        /// A [`FileOpenFuture`] for the next file to be processed
+        next: Option<(FileOpenFuture, Vec<ScalarValue>)>,

Review Comment:
   I wonder if we could make it future-proof by potentially prefetching `n` files instead of 1? I guess in cases where file opening is slower than scanning / processing, this could make a difference (e.g. small files).



-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org