justinli500 commented on code in PR #49855:
URL: https://github.com/apache/arrow/pull/49855#discussion_r4520949714
##########
cpp/src/parquet/arrow/reader.cc:
##########
@@ -1325,10 +1336,27 @@
FileReaderImpl::GetRecordBatchGenerator(std::shared_ptr<FileReader> reader,
reader_properties_.cache_options());
END_PARQUET_CATCH_EXCEPTIONS
}
+ std::vector<int64_t> evict_before_offsets;
+ if (reader_properties_.pre_buffer() &&
reader_properties_.auto_evict_read_cache() &&
+ !column_indices.empty() && !row_group_indices.empty()) {
+ const int64_t kNoMoreRanges = std::numeric_limits<int64_t>::max();
+ evict_before_offsets.resize(row_group_indices.size() + 1, kNoMoreRanges);
+ for (int64_t i = static_cast<int64_t>(row_group_indices.size()) - 1; i >=
0; --i) {
+ ARROW_ASSIGN_OR_RAISE(
+ auto ranges,
reader_->GetReadRanges({row_group_indices[static_cast<size_t>(i)]},
Review Comment:
Sounds good, I kept it as-is!
--
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]