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

Method FetchNext

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

Source from the content-addressed store, hash-verified

1253 }
1254
1255 void FetchNext() {
1256 size_t row_group_index = readahead_index_++;
1257 int row_group = row_groups_[row_group_index];
1258 std::vector<int> column_indices = column_indices_;
1259 auto reader = arrow_reader_;
1260 int64_t num_rows =
1261 reader->parquet_reader()->metadata()->RowGroup(row_group)->num_rows();
1262 rows_in_flight_ += num_rows;
1263 ::arrow::Future<RecordBatchGenerator> row_group_read;
1264 if (!reader->properties().pre_buffer()) {
1265 row_group_read = SubmitRead(cpu_executor_, reader, row_group, column_indices);
1266 } else {
1267 auto ready = reader->parquet_reader()->WhenBuffered({row_group}, column_indices);
1268 if (cpu_executor_) ready = cpu_executor_->TransferAlways(ready);
1269 row_group_read =
1270 ready.Then([cpu_executor = cpu_executor_, reader, row_group,
1271 column_indices = std::move(
1272 column_indices)]() -> ::arrow::Future<RecordBatchGenerator> {
1273 return ReadOneRowGroup(cpu_executor, reader, row_group, column_indices);
1274 });
1275 }
1276 in_flight_reads_.push({std::move(row_group_read), num_rows});
1277 }
1278
1279 // Synchronous fallback for when pre-buffer isn't enabled.
1280 //

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