| 567 | decoder_(type_, options_, static_cast<const TrieCache*>(trie_cache_.get())) {} |
| 568 | |
| 569 | Result<std::shared_ptr<Array>> Convert(const BlockParser& parser, |
| 570 | int32_t col_index) override { |
| 571 | using BuilderType = typename TypeTraits<T>::BuilderType; |
| 572 | using value_type = typename ValueDecoderType::value_type; |
| 573 | |
| 574 | BuilderType builder(type_, pool_); |
| 575 | RETURN_NOT_OK(PresizeBuilder(parser, &builder)); |
| 576 | |
| 577 | auto visit = [&](const uint8_t* data, uint32_t size, bool quoted, |
| 578 | bool missing) -> Status { |
| 579 | if (missing || decoder_.IsNull(data, size, quoted /* quoted */)) { |
| 580 | return builder.AppendNull(); |
| 581 | } |
| 582 | value_type value{}; |
| 583 | RETURN_NOT_OK(decoder_.Decode(data, size, quoted, &value)); |
| 584 | builder.UnsafeAppend(value); |
| 585 | return Status::OK(); |
| 586 | }; |
| 587 | RETURN_NOT_OK(parser.VisitColumn(col_index, visit)); |
| 588 | |
| 589 | std::shared_ptr<Array> res; |
| 590 | RETURN_NOT_OK(builder.Finish(&res)); |
| 591 | return res; |
| 592 | } |
| 593 | |
| 594 | protected: |
| 595 | Status Initialize() override { return decoder_.Initialize(); } |
nothing calls this directly
no test coverage detected