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