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

Function DictionaryChunkArrayNeedUnification

r/src/array_to_vector.cpp:544–560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

542};
543
544bool DictionaryChunkArrayNeedUnification(
545 const std::shared_ptr<ChunkedArray>& chunked_array) {
546 int n = chunked_array->num_chunks();
547 if (n < 2) {
548 return false;
549 }
550 const auto& arr_first =
551 internal::checked_cast<const DictionaryArray&>(*chunked_array->chunk(0));
552 for (int i = 1; i < n; i++) {
553 const auto& arr =
554 internal::checked_cast<const DictionaryArray&>(*chunked_array->chunk(i));
555 if (!(arr_first.dictionary()->Equals(arr.dictionary()))) {
556 return true;
557 }
558 }
559 return false;
560}
561
562class Converter_Dictionary : public Converter {
563 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