snleee commented on code in PR #9910:
URL: https://github.com/apache/pinot/pull/9910#discussion_r1041809590
##########
pinot-core/src/main/java/org/apache/pinot/core/common/ObjectSerDeUtils.java:
##########
@@ -123,7 +124,9 @@ public enum ObjectType {
FloatLongPair(29),
DoubleLongPair(30),
StringLongPair(31),
- CovarianceTuple(32);
+ CovarianceTuple(32),
Review Comment:
If I reuse the covariance implementation, then it will become `naive
algorithm` on
https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Na%C3%AFve_algorithm
According to the documentation, directly computing `Var = (SumSq − (Sum ×
Sum) / n) / (n − 1)` is not numerically stable.
The existing implementation is being used by Hive and Presto and they look
to have separate implementation for covariance and variance.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]