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

Method FetchNext

cpp/src/parquet/arrow/reader.cc:1147–1169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1145 }
1146
1147 void FetchNext() {
1148 size_t row_group_index = readahead_index_++;
1149 int row_group = row_groups_[row_group_index];
1150 std::vector<int> column_indices = column_indices_;
1151 auto reader = arrow_reader_;
1152 int64_t num_rows =
1153 reader->parquet_reader()->metadata()->RowGroup(row_group)->num_rows();
1154 rows_in_flight_ += num_rows;
1155 ::arrow::Future<RecordBatchGenerator> row_group_read;
1156 if (!reader->properties().pre_buffer()) {
1157 row_group_read = SubmitRead(cpu_executor_, reader, row_group, column_indices);
1158 } else {
1159 auto ready = reader->parquet_reader()->WhenBuffered({row_group}, column_indices);
1160 if (cpu_executor_) ready = cpu_executor_->TransferAlways(ready);
1161 row_group_read =
1162 ready.Then([cpu_executor = cpu_executor_, reader, row_group,
1163 column_indices = std::move(
1164 column_indices)]() -> ::arrow::Future<RecordBatchGenerator> {
1165 return ReadOneRowGroup(cpu_executor, reader, row_group, column_indices);
1166 });
1167 }
1168 in_flight_reads_.push({std::move(row_group_read), num_rows});
1169 }
1170
1171 // Synchronous fallback for when pre-buffer isn't enabled.
1172 //

Callers

nothing calls this directly

Calls 8

parquet_readerMethod · 0.80
ThenMethod · 0.80
num_rowsMethod · 0.45
RowGroupMethod · 0.45
metadataMethod · 0.45
propertiesMethod · 0.45
WhenBufferedMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected