| 131 | } |
| 132 | |
| 133 | bool DictionaryArray::CanCompareIndices(const DictionaryArray& other) const { |
| 134 | DCHECK(dictionary()->type()->Equals(other.dictionary()->type())) |
| 135 | << "dictionaries have differing type " << *dictionary()->type() << " vs " |
| 136 | << *other.dictionary()->type(); |
| 137 | |
| 138 | if (!indices()->type()->Equals(other.indices()->type())) { |
| 139 | return false; |
| 140 | } |
| 141 | |
| 142 | auto min_length = std::min(dictionary()->length(), other.dictionary()->length()); |
| 143 | return dictionary()->RangeEquals(other.dictionary(), 0, min_length, 0); |
| 144 | } |
| 145 | |
| 146 | // ---------------------------------------------------------------------- |
| 147 | // Dictionary transposition |