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

Method AddDictionaryType

cpp/src/arrow/ipc/dictionary.cc:238–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238Status DictionaryMemo::AddDictionaryType(int64_t id,
239 const std::shared_ptr<DataType>& type) {
240 // AddDictionaryType expects the dict value type
241 DCHECK_NE(type->id(), Type::DICTIONARY);
242 const auto pair = impl_->id_to_type_.emplace(id, type);
243 if (!pair.second && !pair.first->second->Equals(*type)) {
244 return Status::KeyError("Conflicting dictionary types for id ", id);
245 }
246 return Status::OK();
247}
248
249bool DictionaryMemo::HasDictionary(int64_t id) const {
250 const auto it = impl_->id_to_dictionary_.find(id);

Callers 3

ARROW_ASSIGN_OR_RAISEFunction · 0.80
FieldFromFlatbufferFunction · 0.80
TESTFunction · 0.80

Calls 4

KeyErrorFunction · 0.85
OKFunction · 0.50
idMethod · 0.45
EqualsMethod · 0.45

Tested by 1

TESTFunction · 0.64