You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/15 13:49:52 UTC

[GitHub] [arrow] lidavidm commented on a diff in pull request #14226: ARROW-17599: [C++] Change the way how arrow reads parquet buffered files

lidavidm commented on code in PR #14226:
URL: https://github.com/apache/arrow/pull/14226#discussion_r996309024


##########
cpp/src/parquet/arrow/reader.cc:
##########
@@ -1107,8 +1112,13 @@ class RowGroupGenerator {
     if (!reader->properties().pre_buffer()) {
       row_group_read = SubmitRead(cpu_executor_, reader, row_group, column_indices);
     } else {
+      reader->parquet_reader()->PreBuffer({row_group}, column_indices_,
+                                          reader_properties_.io_context(),
+                                          reader_properties_.cache_options());
       auto ready = reader->parquet_reader()->WhenBuffered({row_group}, column_indices);
       if (cpu_executor_) ready = cpu_executor_->TransferAlways(ready);
+      // wait for buffering the rowgroup before read it
+      ready.Wait();

Review Comment:
   Hmm, why are we synchronously blocking, then attaching a callback to the future in the next step? Something seems off here



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