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

Function DataTypeEquals

cpp/src/gandiva/function_signature.cc:40–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38namespace {
39
40bool DataTypeEquals(const DataTypePtr& left, const DataTypePtr& right) {
41 if (left->id() == right->id()) {
42 switch (left->id()) {
43 case arrow::Type::DECIMAL: {
44 // For decimal types, the precision/scale isn't part of the signature.
45 auto dleft = checked_cast<arrow::DecimalType*>(left.get());
46 auto dright = checked_cast<arrow::DecimalType*>(right.get());
47 return (dleft != NULL) && (dright != NULL) &&
48 (dleft->byte_width() == dright->byte_width());
49 }
50 default:
51 return left->Equals(right);
52 }
53 } else {
54 return false;
55 }
56}
57
58} // namespace
59

Callers 1

operator==Method · 0.85

Calls 4

idMethod · 0.45
getMethod · 0.45
byte_widthMethod · 0.45
EqualsMethod · 0.45

Tested by

no test coverage detected