MCPcopy Create free account
hub / github.com/apache/impala / Equal

Method Equal

be/src/util/tuple-row-compare.h:332–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330 }
331
332 bool Equal(Tuple* x, Tuple* y) {
333 const std::vector<SlotDescriptor*>& slots = tuple_desc_->slots();
334 for (int i = 0; i < slots.size(); ++i) {
335 SlotDescriptor* slot = slots[i];
336
337 if (slot->is_nullable()) {
338 const NullIndicatorOffset& null_offset = slot->null_indicator_offset();
339 if (x->IsNull(null_offset) || y->IsNull(null_offset)) {
340 if (x->IsNull(null_offset) && y->IsNull(null_offset)) {
341 continue;
342 } else {
343 return false;
344 }
345 }
346 }
347
348 int tuple_offset = slot->tuple_offset();
349 const ColumnType& type = slot->type();
350 if (!RawValue::Eq(x->GetSlot(tuple_offset), y->GetSlot(tuple_offset), type)) {
351 return false;
352 }
353 }
354
355 return true;
356 }
357};
358
359/// Compares the equality of two TupleRows, going tuple by tuple.

Callers

nothing calls this directly

Calls 6

tuple_offsetMethod · 0.80
sizeMethod · 0.45
is_nullableMethod · 0.45
IsNullMethod · 0.45
typeMethod · 0.45
GetSlotMethod · 0.45

Tested by

no test coverage detected