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


##########
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:
   @alamb do you think, changing from `None | Some(Ordering::Greater)` to 
`Some(Ordering::Greater) | None` will make any difference because of short 
circuiting. If you think so I can change this and other comparison so that they 
benefit from short circuiting.



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