akurmustafa commented on code in PR #13432:
URL: https://github.com/apache/datafusion/pull/13432#discussion_r1844883502


##########
datafusion/functions-aggregate/src/min_max.rs:
##########
@@ -113,8 +114,12 @@ macro_rules! primitive_max_accumulator {
     ($DATA_TYPE:ident, $NATIVE:ident, $PRIMTYPE:ident) => {{
         Ok(Box::new(
             PrimitiveGroupsAccumulator::<$PRIMTYPE, _>::new($DATA_TYPE, |cur, 
new| {
-                if *cur < new {
-                    *cur = new
+                match (new).partial_cmp(cur) {
+                    None | Some(Ordering::Greater) => {

Review Comment:
   I just swapped the operations to be on the safe side, I don't think we need 
to re-run benchmarks (won't be visible probably even if makes 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.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to