| 461 | class 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(); |
nothing calls this directly
no test coverage detected