andishgar commented on code in PR #51325:
URL: https://github.com/apache/arrow/pull/51325#discussion_r4623821702


##########
cpp/src/arrow/compare.h:
##########
@@ -108,6 +108,19 @@ class EqualOptions {
     return res;
   }
 
+  /// Whether to compare floating-point values by their physical 
representation.
+  bool physical_repr_equal() const { return physical_repr_equal_; }
+
+  /// Return a copy of this EqualOptions object with the "physical_repr_equal"
+  /// property set to the specified value.
+  /// If both "physical_repr_equal" and "nans_equal" are enabled, two values
+  /// are considered equal if either condition is satisfied.
+  EqualOptions physical_repr_equal(bool v) const {

Review Comment:
    @zanmato1984, a couple of notes:
   
   1. None of the following `EqualOptions` are currently applied to sparse 
tensor equality comparisons: `signed_zeros_equal`, `ulp_distance`, `atol`, and 
`physical_repr_equal`.
   2. NaNs are not handled correctly when both data pointers refer to the same 
location, due to the following line:
      
https://github.com/apache/arrow/blob/931b9cccda5de68d48201dc2db50b6b6a9a72741/cpp/src/arrow/compare.cc#L1355
   
   Given these issues, would you mind if I opened a separate issue to track 
them and simply left a comment here mentioning that sparse tensors are not 
currently handled?



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to