| 571 | // Binary, direct to dictionary-encoded |
| 572 | |
| 573 | Status TransferDictionary(RecordReader* reader, MemoryPool* pool, |
| 574 | const std::shared_ptr<DataType>& logical_value_type, |
| 575 | bool nullable, std::shared_ptr<ChunkedArray>* out) { |
| 576 | auto dict_reader = dynamic_cast<DictionaryRecordReader*>(reader); |
| 577 | DCHECK(dict_reader); |
| 578 | *out = dict_reader->GetResult(); |
| 579 | if (!logical_value_type->Equals(*(*out)->type())) { |
| 580 | ARROW_ASSIGN_OR_RAISE(*out, ViewOrCastChunkedArray(*out, pool, logical_value_type)); |
| 581 | } |
| 582 | if (!nullable) { |
| 583 | ::arrow::ArrayVector chunks = (*out)->chunks(); |
| 584 | ReconstructChunksWithoutNulls(&chunks); |
| 585 | *out = std::make_shared<ChunkedArray>(std::move(chunks), logical_value_type); |
| 586 | } |
| 587 | return Status::OK(); |
| 588 | } |
| 589 | |
| 590 | Status TransferBinary(RecordReader* reader, MemoryPool* pool, |
| 591 | const std::shared_ptr<Field>& logical_type_field, |
no test coverage detected