pitrou commented on code in PR #43799:
URL: https://github.com/apache/arrow/pull/43799#discussion_r1736627156
##########
cpp/src/arrow/compute/kernels/aggregate_basic.cc:
##########
@@ -532,13 +532,13 @@ struct BooleanAnyImpl : public ScalarAggregator {
}
if (batch[0].is_scalar()) {
const Scalar& scalar = *batch[0].scalar;
- this->has_nulls = !scalar.is_valid;
- this->any = scalar.is_valid && checked_cast<const
BooleanScalar&>(scalar).value;
- this->count += scalar.is_valid;
+ this->has_nulls |= !scalar.is_valid;
Review Comment:
I think @mapleFU is right here. `this->has_nulls` is meant to represent
whether any null was encountered, so it should never change from `true` to
`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]