gianm commented on a change in pull request #10285:
URL: https://github.com/apache/druid/pull/10285#discussion_r470809516
##########
File path: docs/development/extensions-core/stats.md
##########
@@ -44,6 +44,13 @@ This algorithm was proven to be numerically stable by J.L.
Barlow in
"Error analysis of a pairwise summation algorithm to compute sample variance"
Numer. Math, 58 (1991) pp. 583--590
+> As with all [aggregators](../../querying/sql.md#aggregation-functions), the
order of operations across segments is
+> non-deterministic. This means that if this aggregator is used with an input
type of "float", the result of the
+> aggregation will not be precisely the same across multiple runs of the query.
+>
+> To produce consistent results, either cast the input type to a "double" or
round the variance to
Review comment:
Double and float are both floating-point, so should behave the same way
in this regard.
##########
File path: docs/querying/sql.md
##########
@@ -232,6 +232,10 @@ possible for two aggregators in the same SQL query to have
different filters.
Only the COUNT aggregation can accept DISTINCT.
+> The order of aggregation operations across segments is not deterministic.
This means that non-commutative aggregation
+> functions can produce inconsistent results across the same query. Any
functions that operate on an input type of "float"
+> may also see these differences in aggregation results across multiple query
runs.
Review comment:
Similar comment.
----------------------------------------------------------------
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]