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

Function ScalarEquals

cpp/src/arrow/compare.cc:1164–1181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1162}
1163
1164bool ScalarEquals(const Scalar& left, const Scalar& right, const EqualOptions& options) {
1165 if (&left == &right && IdentityImpliesEquality(*left.type, options)) {
1166 return true;
1167 }
1168 if (!left.type->Equals(right.type)) {
1169 return false;
1170 }
1171 if (left.is_valid != right.is_valid) {
1172 return false;
1173 }
1174 if (!left.is_valid) {
1175 return true;
1176 }
1177 ScalarEqualsVisitor visitor(right, options);
1178 auto error = VisitScalarInline(left, &visitor);
1179 DCHECK_OK(error);
1180 return visitor.result();
1181}
1182
1183bool ScalarApproxEquals(const Scalar& left, const Scalar& right,
1184 const EqualOptions& options) {

Callers 3

VisitMethod · 0.85
ScalarApproxEqualsFunction · 0.85
EqualsMethod · 0.85

Calls 4

IdentityImpliesEqualityFunction · 0.85
VisitScalarInlineFunction · 0.85
EqualsMethod · 0.45
resultMethod · 0.45

Tested by

no test coverage detected