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

Method Compare

cpp/src/arrow/compare.cc:214–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212 result_(false) {}
213
214 bool Compare() {
215 // Compare null bitmaps
216 if (left_start_idx_ == 0 && right_start_idx_ == 0 && range_length_ == left_.length &&
217 range_length_ == right_.length) {
218 // If we're comparing entire arrays, we can first compare the cached null counts
219 if (left_.GetNullCount() != right_.GetNullCount()) {
220 return false;
221 }
222 }
223 if (!OptionalBitmapEquals(left_.buffers[0], left_.offset + left_start_idx_,
224 right_.buffers[0], right_.offset + right_start_idx_,
225 range_length_)) {
226 return false;
227 }
228 // Compare values
229 return CompareWithType(*left_.type);
230 }
231
232 bool CompareWithType(const DataType& type) {
233 result_ = true;

Callers 5

VisitMethod · 0.45
CompareListMethod · 0.45
CompareListViewMethod · 0.45
CompareRunEndEncodedMethod · 0.45
CompareArrayRangesFunction · 0.45

Calls 2

OptionalBitmapEqualsFunction · 0.85
GetNullCountMethod · 0.80

Tested by

no test coverage detected