jorisvandenbossche commented on a change in pull request #10476:
URL: https://github.com/apache/arrow/pull/10476#discussion_r650962333
##########
File path: cpp/src/arrow/compute/kernels/aggregate_basic.cc
##########
@@ -166,32 +168,48 @@ struct BooleanAnyImpl : public ScalarAggregator {
Status MergeFrom(KernelContext*, KernelState&& src) override {
const auto& other = checked_cast<const BooleanAnyImpl&>(src);
this->any |= other.any;
+ this->has_nulls |= other.has_nulls;
return Status::OK();
}
- Status Finalize(KernelContext*, Datum* out) override {
- out->value = std::make_shared<BooleanScalar>(this->any);
+ Status Finalize(KernelContext* ctx, Datum* out) override {
+ if (!options.skip_nulls && !this->any && this->has_nulls) {
Review comment:
I am not sure there is a good use case for a non-kleene version, so I am
fine with just documenting for now that the behaviour follows Kleene logic (so
is the reducing version of and/or_kleene)
--
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:
[email protected]