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

Method Compare

cpp/src/arrow/compare.cc:243–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241 result_(false) {}
242
243 bool Compare() {
244 // Compare null bitmaps
245 if (left_start_idx_ == 0 && right_start_idx_ == 0 && range_length_ == left_.length &&
246 range_length_ == right_.length) {
247 // If we're comparing entire arrays, we can first compare the cached null counts
248 if (left_.GetNullCount() != right_.GetNullCount()) {
249 return false;
250 }
251 }
252 if (!OptionalBitmapEquals(left_.buffers[0], left_.offset + left_start_idx_,
253 right_.buffers[0], right_.offset + right_start_idx_,
254 range_length_)) {
255 return false;
256 }
257 // Compare values
258 return CompareWithType(*left_.type);
259 }
260
261 bool CompareWithType(const DataType& type) {
262 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