nevi-me commented on a change in pull request #8165:
URL: https://github.com/apache/arrow/pull/8165#discussion_r486971637



##########
File path: rust/arrow/src/compute/kernels/aggregate.rs
##########
@@ -27,40 +27,51 @@ pub fn min<T>(array: &PrimitiveArray<T>) -> 
Option<T::Native>
 where
     T: ArrowNumericType,
 {
-    min_max_helper(array, |a, b| a < b)
+    min_max_helper(array, |a, b| a > b)
 }
 
 /// Returns the maximum value in the array, according to the natural order.
 pub fn max<T>(array: &PrimitiveArray<T>) -> Option<T::Native>
 where
     T: ArrowNumericType,
 {
-    min_max_helper(array, |a, b| a > b)
+    min_max_helper(array, |a, b| a < b)

Review comment:
       was the ordering here originally incorrect?

##########
File path: rust/arrow/src/compute/kernels/aggregate.rs
##########
@@ -27,40 +27,51 @@ pub fn min<T>(array: &PrimitiveArray<T>) -> 
Option<T::Native>
 where
     T: ArrowNumericType,
 {
-    min_max_helper(array, |a, b| a < b)
+    min_max_helper(array, |a, b| a > b)
 }
 
 /// Returns the maximum value in the array, according to the natural order.
 pub fn max<T>(array: &PrimitiveArray<T>) -> Option<T::Native>
 where
     T: ArrowNumericType,
 {
-    min_max_helper(array, |a, b| a > b)
+    min_max_helper(array, |a, b| a < b)

Review comment:
       No worries, happy with the change

##########
File path: rust/arrow/src/compute/kernels/aggregate.rs
##########
@@ -27,40 +27,51 @@ pub fn min<T>(array: &PrimitiveArray<T>) -> 
Option<T::Native>
 where
     T: ArrowNumericType,
 {
-    min_max_helper(array, |a, b| a < b)
+    min_max_helper(array, |a, b| a > b)
 }
 
 /// Returns the maximum value in the array, according to the natural order.
 pub fn max<T>(array: &PrimitiveArray<T>) -> Option<T::Native>
 where
     T: ArrowNumericType,
 {
-    min_max_helper(array, |a, b| a > b)
+    min_max_helper(array, |a, b| a < b)

Review comment:
       was the ordering here originally incorrect?

##########
File path: rust/arrow/src/compute/kernels/aggregate.rs
##########
@@ -27,40 +27,51 @@ pub fn min<T>(array: &PrimitiveArray<T>) -> 
Option<T::Native>
 where
     T: ArrowNumericType,
 {
-    min_max_helper(array, |a, b| a < b)
+    min_max_helper(array, |a, b| a > b)
 }
 
 /// Returns the maximum value in the array, according to the natural order.
 pub fn max<T>(array: &PrimitiveArray<T>) -> Option<T::Native>
 where
     T: ArrowNumericType,
 {
-    min_max_helper(array, |a, b| a > b)
+    min_max_helper(array, |a, b| a < b)

Review comment:
       No worries, happy with the change




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