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

Method ReadOneRowGroup

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

Source from the content-addressed store, hash-verified

1234 }
1235
1236 static ::arrow::Future<RecordBatchGenerator> ReadOneRowGroup(
1237 ::arrow::internal::Executor* cpu_executor, std::shared_ptr<FileReaderImpl> self,
1238 const int row_group, const std::vector<int>& column_indices) {
1239 // Skips bound checks/pre-buffering, since we've done that already
1240 const int64_t batch_size = self->properties().batch_size();
1241 return self->DecodeRowGroups(self, {row_group}, column_indices, cpu_executor)
1242 .Then([batch_size](const std::shared_ptr<Table>& table)
1243 -> ::arrow::Result<RecordBatchGenerator> {
1244 ::arrow::TableBatchReader table_reader(*table);
1245 table_reader.set_chunksize(batch_size);
1246 ARROW_ASSIGN_OR_RAISE(auto batches, table_reader.ToRecordBatches());
1247 return ::arrow::MakeVectorGenerator(std::move(batches));
1248 });
1249 }
1250
1251 std::shared_ptr<FileReaderImpl> arrow_reader_;
1252 ::arrow::internal::Executor* cpu_executor_;

Callers

nothing calls this directly

Calls 5

MakeVectorGeneratorFunction · 0.85
ThenMethod · 0.80
DecodeRowGroupsMethod · 0.80
set_chunksizeMethod · 0.80
propertiesMethod · 0.45

Tested by

no test coverage detected