MCPcopy Create free account
hub / github.com/apache/arrow / WillNeed

Method WillNeed

cpp/src/parquet/page_index.cc:430–452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428 }
429
430 void WillNeed(const std::vector<int32_t>& row_group_indices,
431 const std::vector<int32_t>& column_indices,
432 const PageIndexSelection& selection) override {
433 std::vector<::arrow::io::ReadRange> read_ranges;
434 for (int32_t row_group_ordinal : row_group_indices) {
435 auto read_range = PageIndexReader::DeterminePageIndexRangesInRowGroup(
436 *file_metadata_->RowGroup(row_group_ordinal), column_indices);
437 if (selection.column_index && read_range.column_index.has_value()) {
438 read_ranges.push_back(*read_range.column_index);
439 } else {
440 // Mark the column index as not requested.
441 read_range.column_index = std::nullopt;
442 }
443 if (selection.offset_index && read_range.offset_index.has_value()) {
444 read_ranges.push_back(*read_range.offset_index);
445 } else {
446 // Mark the offset index as not requested.
447 read_range.offset_index = std::nullopt;
448 }
449 index_read_ranges_.emplace(row_group_ordinal, std::move(read_range));
450 }
451 PARQUET_THROW_NOT_OK(input_->WillNeed(read_ranges));
452 }
453
454 void WillNotNeed(const std::vector<int32_t>& row_group_indices) override {
455 for (int32_t row_group_ordinal : row_group_indices) {

Callers 2

TEST_PFunction · 0.45
CheckPageIndexMethod · 0.45

Calls 2

push_backMethod · 0.80
RowGroupMethod · 0.45

Tested by 2

TEST_PFunction · 0.36
CheckPageIndexMethod · 0.36