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

Method CanCompareIndices

cpp/src/arrow/array/array_dict.cc:135–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

TESTFunction · 0.80

Calls 8

indicesFunction · 0.85
indicesMethod · 0.80
RangeEqualsMethod · 0.80
dictionaryFunction · 0.50
EqualsMethod · 0.45
typeMethod · 0.45
dictionaryMethod · 0.45
lengthMethod · 0.45

Tested by 1

TESTFunction · 0.64