lidavidm commented on a change in pull request #10942:
URL: https://github.com/apache/arrow/pull/10942#discussion_r692054484



##########
File path: cpp/src/arrow/compute/kernels/aggregate_basic.cc
##########
@@ -363,11 +381,13 @@ struct BooleanAllImpl : public ScalarAggregator {
     const auto& other = checked_cast<const BooleanAllImpl&>(src);
     this->all &= other.all;
     this->has_nulls |= other.has_nulls;
+    this->count += other.count;
     return Status::OK();
   }
 
   Status Finalize(KernelContext*, Datum* out) override {
-    if (!options.skip_nulls && this->all && this->has_nulls) {
+    if ((!options.skip_nulls && this->all && this->has_nulls) ||
+        this->count < options.min_count) {

Review comment:
       Yes, and this matches base R/dplyr's behavior:
   
   ```r
   > all(c(FALSE, TRUE, NA), na.rm = FALSE)
   [1] FALSE
   ```




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


Reply via email to