| 581 | }; |
| 582 | |
| 583 | bool 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 | |
| 601 | class Converter_Dictionary : public Converter { |
| 602 | private: |
no test coverage detected