A special handling was added for the precision of sum(v*v) - (sum * sum) / n, as in some cases this difference can turn negative, resulting in an incorrect calculation of variance.
A special check was also implemented for empty arrays where the count is 0.
Checklist
[x] I have written necessary rustdoc comments
[x] I have added necessary unit tests and integration tests
[x] All checks passed in ./risedev check (or alias, ./risedev c)
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
A special handling was added for the precision of
sum(v*v) - (sum * sum) / n
, as in some cases this difference can turn negative, resulting in an incorrect calculation of variance.A special check was also implemented for empty arrays where the count is 0.
Checklist
./risedev check
(or alias,./risedev c
)