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

Method LeafReader

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

Source from the content-addressed store, hash-verified

461class LeafReader : public ColumnReaderImpl {
462 public:
463 LeafReader(std::shared_ptr<ReaderContext> ctx, std::shared_ptr<Field> field,
464 std::unique_ptr<FileColumnIterator> input,
465 ::parquet::internal::LevelInfo leaf_info)
466 : ctx_(std::move(ctx)),
467 field_(std::move(field)),
468 input_(std::move(input)),
469 descr_(input_->descr()) {
470 const auto type_id = field_->type()->id();
471 // If binary-like, RecordReader is able to read directly as the concrete type
472 // so as to avoid offset limitations.
473 std::shared_ptr<DataType> type_for_reading =
474 (::arrow::is_base_binary_like(type_id) || ::arrow::is_binary_view_like(type_id))
475 ? field_->type()
476 : nullptr;
477 record_reader_ = RecordReader::Make(
478 descr_, leaf_info, ctx_->pool,
479 /*read_dictionary=*/field_->type()->id() == ::arrow::Type::DICTIONARY,
480 /*read_dense_for_nullable=*/false, /*arrow_type=*/type_for_reading);
481 NextRowGroup();
482 }
483
484 Status GetDefLevels(const int16_t** data, int64_t* length) final {
485 *data = record_reader_->def_levels();

Callers

nothing calls this directly

Calls 6

is_base_binary_likeFunction · 0.85
is_binary_view_likeFunction · 0.85
MakeFunction · 0.50
descrMethod · 0.45
idMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected