suneet-s commented on a change in pull request #10340:
URL: https://github.com/apache/druid/pull/10340#discussion_r483164648
##########
File path:
extensions-core/stats/src/main/java/org/apache/druid/query/aggregation/variance/VarianceAggregatorFactory.java
##########
@@ -239,7 +240,9 @@ public Comparator getComparator()
@Override
public Object finalizeComputation(@Nullable Object object)
{
- return object == null ? null : ((VarianceAggregatorCollector)
object).getVariance(isVariancePop);
+ return object == null || ((VarianceAggregatorCollector) object).count == 0
+ ? null
Review comment:
👍 I'll add the test and push up a new patch
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]