HuaHuaY commented on code in PR #50807:
URL: https://github.com/apache/arrow/pull/50807#discussion_r3804837448


##########
cpp/src/parquet/statistics.cc:
##########
@@ -523,6 +564,66 @@ class TypedComparatorImpl
   int type_length_;
 };
 
+template <typename DType>
+class TotalOrderComparatorImpl
+    : public TypedComparator<typename RebindLogical<DType>::DType> {
+ public:
+  using T = typename RebindLogical<DType>::c_type;
+
+  bool Compare(const T& lhs, const T& rhs) const override {
+    return std::is_lt(TotalOrderCompare(ToArrowFloat(lhs), ToArrowFloat(rhs)));
+  }
+
+  std::pair<T, T> GetMinMax(const T* values, int64_t length) const override {
+    DCHECK_GT(length, 0);
+    T min = SafeLoad(values);
+    T max = min;
+    for (int64_t value_index = 1; value_index < length; ++value_index) {
+      const T value = SafeLoad(values + value_index);

Review Comment:
   Here we use total order to compare so we should not eliminate NaN values.



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