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

Function FuzzyCompare

be/src/udf/uda-test.cc:249–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249bool FuzzyCompare(const BigIntVal& r1, const BigIntVal& r2) {
250 if (r1.is_null && r2.is_null) return true;
251 if (r1.is_null || r2.is_null) return false;
252 return std::abs(r1.val - r2.val) <= 1;
253}
254
255TEST(CountTest, FuzzyEquals) {
256 UdaTestHarness<BigIntVal, BigIntVal, IntVal> test(

Callers

nothing calls this directly

Calls 1

absFunction · 0.85

Tested by

no test coverage detected