MCPcopy Create free account
hub / github.com/apache/arrow / TransferDictionary

Function TransferDictionary

cpp/src/parquet/arrow/reader_internal.cc:573–588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

571// Binary, direct to dictionary-encoded
572
573Status 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
590Status TransferBinary(RecordReader* reader, MemoryPool* pool,
591 const std::shared_ptr<Field>& logical_type_field,

Callers 2

TransferBinaryFunction · 0.85
TransferColumnDataFunction · 0.85

Calls 8

ViewOrCastChunkedArrayFunction · 0.85
ARROW_ASSIGN_OR_RAISEFunction · 0.70
OKFunction · 0.50
GetResultMethod · 0.45
EqualsMethod · 0.45
typeMethod · 0.45
chunksMethod · 0.45

Tested by

no test coverage detected