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

Function ScalarEquals

cpp/src/arrow/compare.cc:1133–1151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1131}
1132
1133bool ScalarEquals(const Scalar& left, const Scalar& right, const EqualOptions& options,
1134 bool floating_approximate) {
1135 if (&left == &right && IdentityImpliesEquality(*left.type, options)) {
1136 return true;
1137 }
1138 if (!left.type->Equals(right.type)) {
1139 return false;
1140 }
1141 if (left.is_valid != right.is_valid) {
1142 return false;
1143 }
1144 if (!left.is_valid) {
1145 return true;
1146 }
1147 ScalarEqualsVisitor visitor(right, options, floating_approximate);
1148 auto error = VisitScalarInline(left, &visitor);
1149 DCHECK_OK(error);
1150 return visitor.result();
1151}
1152
1153} // namespace
1154

Callers 3

VisitMethod · 0.85
ScalarApproxEqualsFunction · 0.85
EqualsMethod · 0.85

Calls 5

IdentityImpliesEqualityFunction · 0.85
VisitScalarInlineFunction · 0.85
use_atolMethod · 0.80
EqualsMethod · 0.45
resultMethod · 0.45

Tested by

no test coverage detected