liyafan82 commented on a change in pull request #7826:
URL: https://github.com/apache/arrow/pull/7826#discussion_r469918164



##########
File path: cpp/src/arrow/compare.cc
##########
@@ -113,8 +113,9 @@ inline bool FloatingApproxEquals(const 
NumericArray<ArrowType>& left,
       return (fabs(x - y) <= epsilon) || (std::isnan(x) && std::isnan(y));
     });
   } else {
-    return BaseFloatingEquals<ArrowType>(
-        left, right, [epsilon](T x, T y) -> bool { return fabs(x - y) <= 
epsilon; });
+    return BaseFloatingEquals<ArrowType>(left, right, [epsilon](T x, T y) -> 
bool {
+      return (fabs(x - y) <= epsilon) || (x == y);
+    });

Review comment:
       Revised accordingly. Thanks a lot for your kind reminder. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to