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

Method ReadColumn

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

Source from the content-addressed store, hash-verified

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