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