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

Function GetDictionaryEncoding

cpp/src/arrow/ipc/metadata_internal.cc:479–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

477}
478
479static Status GetDictionaryEncoding(FBB& fbb, const std::shared_ptr<Field>& field,
480 const DictionaryType& type, int64_t dictionary_id,
481 DictionaryOffset* out) {
482 // We assume that the dictionary index type (as an integer) has already been
483 // validated elsewhere, and can safely assume we are dealing with integers
484 const auto& index_type = checked_cast<const IntegerType&>(*type.index_type());
485
486 auto index_type_offset =
487 flatbuf::CreateInt(fbb, index_type.bit_width(), index_type.is_signed());
488
489 *out = flatbuf::CreateDictionaryEncoding(fbb, dictionary_id, index_type_offset,
490 type.ordered());
491 return Status::OK();
492}
493
494static KeyValueOffset AppendKeyValue(FBB& fbb, const std::string& key,
495 const std::string& value) {

Callers 1

GetResultMethod · 0.85

Calls 6

CreateIntFunction · 0.85
CreateDictionaryEncodingFunction · 0.85
index_typeMethod · 0.80
OKFunction · 0.50
bit_widthMethod · 0.45
is_signedMethod · 0.45

Tested by

no test coverage detected