| 247 | } |
| 248 | |
| 249 | bool 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 | |
| 255 | TEST(CountTest, FuzzyEquals) { |
| 256 | UdaTestHarness<BigIntVal, BigIntVal, IntVal> test( |