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

Function DictionaryChunkArrayNeedUnification

r/src/array_to_vector.cpp:583–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

581};
582
583bool DictionaryChunkArrayNeedUnification(
584 const std::shared_ptr<ChunkedArray>& chunked_array) {
585 int n = chunked_array->num_chunks();
586 if (n < 2) {
587 return false;
588 }
589 const auto& arr_first =
590 internal::checked_cast<const DictionaryArray&>(*chunked_array->chunk(0));
591 for (int i = 1; i < n; i++) {
592 const auto& arr =
593 internal::checked_cast<const DictionaryArray&>(*chunked_array->chunk(i));
594 if (!(arr_first.dictionary()->Equals(arr.dictionary()))) {
595 return true;
596 }
597 }
598 return false;
599}
600
601class Converter_Dictionary : public Converter {
602 private:

Callers 2

Converter_DictionaryMethod · 0.85
MakeMethod · 0.85

Calls 3

num_chunksMethod · 0.45
EqualsMethod · 0.45
dictionaryMethod · 0.45

Tested by

no test coverage detected