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

Method ReadColumn

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

Source from the content-addressed store, hash-verified

268 }
269
270 Status ReadColumn(int i, const std::vector<int>& row_groups, ColumnReader* reader,
271 std::shared_ptr<ChunkedArray>* out) {
272 BEGIN_PARQUET_CATCH_EXCEPTIONS
273 // TODO(wesm): This calculation doesn't make much sense when we have repeated
274 // schema nodes
275 int64_t records_to_read = 0;
276 for (auto row_group : row_groups) {
277 // Can throw exception
278 records_to_read +=
279 reader_->metadata()->RowGroup(row_group)->ColumnChunk(i)->num_values();
280 }
281#ifdef ARROW_WITH_OPENTELEMETRY
282 std::string column_name = reader_->metadata()->schema()->Column(i)->name();
283 std::string phys_type =
284 TypeToString(reader_->metadata()->schema()->Column(i)->physical_type());
285 ::arrow::util::tracing::Span span;
286 START_SPAN(span, "parquet::arrow::read_column",
287 {{"parquet.arrow.columnindex", i},
288 {"parquet.arrow.columnname", column_name},
289 {"parquet.arrow.physicaltype", phys_type},
290 {"parquet.arrow.records_to_read", records_to_read}});
291#endif
292 return reader->NextBatch(records_to_read, out);
293 END_PARQUET_CATCH_EXCEPTIONS
294 }
295
296 Status ReadColumn(int i, const std::vector<int>& row_groups,
297 std::shared_ptr<ChunkedArray>* out) {

Callers 5

ReadMethod · 0.45
StatisticsReadArrayFunction · 0.45
read_single_columnFunction · 0.45

Calls 14

TypeToStringFunction · 0.85
IotaFunction · 0.85
physical_typeMethod · 0.80
NextBatchMethod · 0.80
GetColumnFunction · 0.50
num_valuesMethod · 0.45
ColumnChunkMethod · 0.45
RowGroupMethod · 0.45
metadataMethod · 0.45
nameMethod · 0.45
ColumnMethod · 0.45
schemaMethod · 0.45

Tested by 1

StatisticsReadArrayFunction · 0.36