alamb commented on code in PR #6144:
URL: https://github.com/apache/arrow-rs/pull/6144#discussion_r2064168038


##########
arrow-arith/src/aggregate.rs:
##########
@@ -350,11 +350,46 @@ pub fn min_boolean(array: &BooleanArray) -> Option<bool> {
     }
 
     // Note the min bool is false (0), so short circuit as soon as we see it
-    array
-        .iter()
-        .find(|&b| b == Some(false))
-        .flatten()
-        .or(Some(true))
+    match array.nulls() {
+        None => {
+            let bit_chunks = array.values().bit_chunks();
+            if bit_chunks.iter().any(|x| {

Review Comment:
   FWIW I think @acking-you found that this type of code actually goes faster 
if we can somehow avoid branching (e.g. do an unconditional OR of all chunks 
and check for zero, for example)



-- 
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...@arrow.apache.org

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

Reply via email to