kou commented on code in PR #46385:
URL: https://github.com/apache/arrow/pull/46385#discussion_r2189235349


##########
cpp/src/arrow/array/statistics_test.cc:
##########
@@ -152,4 +163,19 @@ TEST_F(TestArrayStatisticsEqualityDoubleValue, 
ApproximateEquals) {
   ASSERT_TRUE(statistics1_.Equals(statistics2_, 
options_.atol(1e-3).use_atol(true)));
 }
 
+TEST_F(TestArrayStatisticsEqualityDoubleValue, DoubleAttributeCombination) {
+  statistics1_.max = 0.5;
+  ASSERT_FALSE(statistics1_.Equals(statistics2_));
+  statistics2_.max = 0.5;
+  ASSERT_TRUE(statistics1_.Equals(statistics2_));
+  statistics1_.min = 0.5;
+  ASSERT_FALSE(statistics1_.Equals(statistics2_));
+  statistics2_.min = 0.5;

Review Comment:
   Do we need this?
   
   Is only `average_byte_width` enough because `min`/`max` are tested in other 
tests?



##########
cpp/src/arrow/record_batch.cc:
##########
@@ -45,6 +45,7 @@
 #include "arrow/util/logging_internal.h"
 #include "arrow/util/vector.h"
 #include "arrow/visit_type_inline.h"
+#include "util/logger.h"

Review Comment:
   Why do we need this?



##########
cpp/src/arrow/compare.cc:
##########
@@ -1563,6 +1563,9 @@ bool ArrayStatisticsEqualsImpl(const ArrayStatistics& 
left, const ArrayStatistic
          left.distinct_count == right.distinct_count &&
          left.is_min_exact == right.is_min_exact &&
          left.is_max_exact == right.is_max_exact &&
+         left.is_average_byte_width_exact == right.is_average_byte_width_exact 
&&

Review Comment:
   Could you use the same order in `.h`?
   
   ```suggestion
            left.is_average_byte_width_exact == 
right.is_average_byte_width_exact &&
            left.is_min_exact == right.is_min_exact &&
            left.is_max_exact == right.is_max_exact &&
   ```



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