jorisvandenbossche commented on a change in pull request #8474:
URL: https://github.com/apache/arrow/pull/8474#discussion_r522953360



##########
File path: cpp/src/arrow/compute/kernels/aggregate_basic.cc
##########
@@ -151,6 +151,45 @@ std::unique_ptr<KernelState> MinMaxInit(KernelContext* 
ctx, const KernelInitArgs
   return visitor.Create();
 }
 
+// ----------------------------------------------------------------------
+// All implementation
+
+struct BooleanAllImpl : public ScalarAggregator {
+  void Consume(KernelContext*, const ExecBatch& batch) override {
+    // short-circuit if seen a false already
+    if (this->all == false) {
+      return;
+    }
+
+    const auto& data = *batch[0].array();
+    arrow::internal::OptionalBinaryBitBlockCounter counter(
+        data.buffers[1], data.offset, data.buffers[0], data.offset, 
data.length);
+    int64_t position = 0;
+    while (position < data.length) {
+      const auto block = counter.NextOrNotBlock();

Review comment:
       Just wondering but should it in theory not be a "AndNot" instead of 
"OrNot" ?




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

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


Reply via email to