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

Method CanCompareIndices

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

Source from the content-addressed store, hash-verified

131}
132
133bool 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

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