westonpace commented on code in PR #36779:
URL: https://github.com/apache/arrow/pull/36779#discussion_r1304715707
##########
cpp/src/parquet/arrow/reader.cc:
##########
@@ -114,6 +116,32 @@ class ColumnReaderImpl : public ColumnReader {
return Status::OK();
}
+ ::arrow::Result<std::shared_ptr<::arrow::ChunkedArray>> NextBatch(
+ int64_t batch_size) final {
+ std::shared_ptr<::arrow::ChunkedArray> out;
+ RETURN_NOT_OK(NextBatch(batch_size, &out));
+ return out;
+ }
+
+ Future<std::shared_ptr<ChunkedArray>> NextBatchAsync(
+ int64_t batch_size, ::arrow::internal::Executor* io_executor,
+ ::arrow::internal::Executor* cpu_executor) final {
+ Future<> load_fut = ::arrow::DeferNotOk(
+ io_executor->Submit([this, batch_size] { return LoadBatch(batch_size);
}));
Review Comment:
Good observation. In a perfect world we would do all of that on a CPU
thread. This would help to keep context switches to a minimum. The only work
that would happen on the I/O thread would be the `RandomAccessFile` call to
read the file. However, that requires pushing async further into the parquet
code base which would be a lot of work. It's not clear that the benefit would
be significant enough to require the work.
--
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]