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

Method dictionary

cpp/src/arrow/compute/kernels/vector_hash.cc:508–520  ·  view source on GitHub ↗

This can't be called more than once because DictionaryUnifier::GetResult() can't be called more than once and produce the same output.

Source from the content-addressed store, hash-verified

506 /// This can't be called more than once because DictionaryUnifier::GetResult()
507 /// can't be called more than once and produce the same output.
508 Result<std::shared_ptr<Array>> dictionary() const {
509 if (!first_dictionary_) { // Append was never called
510 return nullptr;
511 }
512 if (!dictionary_unifier_) { // Append was called only once
513 return first_dictionary_;
514 }
515
516 auto out_dict_type = first_dictionary_->type();
517 std::shared_ptr<Array> out_dict;
518 RETURN_NOT_OK(dictionary_unifier_->GetResult(&out_dict_type, &out_dict));
519 return out_dict;
520 }
521
522 private:
523 std::unique_ptr<HashKernel> indices_kernel_;

Callers 15

test_dictionaryMethod · 0.45
WriteIndicesUniformMethod · 0.45
WriteIndicesVaryingMethod · 0.45
WriteIndicesMethod · 0.45
test_auto_dict_encodeMethod · 0.45
test_arrow_one_way_typesFunction · 0.45
test_partitioningFunction · 0.45
test_filesystem_factoryFunction · 0.45

Calls 2

typeMethod · 0.45
GetResultMethod · 0.45