jorgecarleitao commented on a change in pull request #8165:
URL: https://github.com/apache/arrow/pull/8165#discussion_r486972953



##########
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, but a change in the implementation of `min_max_helper` made it 
require the opposite. We could probably change it to keep this unchanged, but 
since this is so specific to this module, I did not bother.




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