lidavidm commented on a change in pull request #10942:
URL: https://github.com/apache/arrow/pull/10942#discussion_r691218753
##########
File path: cpp/src/arrow/compute/kernels/aggregate_basic.cc
##########
@@ -172,6 +173,7 @@ struct ProductImpl : public ScalarAggregator {
} else {
const auto& data = *batch[0].scalar();
this->count += data.is_valid * batch.length;
+ this->nulls_observed = this->nulls_observed || !data.is_valid;
Review comment:
Ah yes, we can short-circuit as soon as nulls_observed if we have
!skip_nulls. Updated, thanks for pointing this out.
--
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]