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


##########
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 am not sure to be honest -- it wouldn't hurt to try it (I can also rerun 
the benchmarks too if you want)



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to