1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Welford algorithm for STD and VAR

Naive algorithm for calculating STD and VAR is subject to catastrophic
cancellation. A well-known Welford's algorithms is used instead.
This commit is contained in:
Andrey Piskunov
2022-06-01 19:02:24 +03:00
parent 4e50fca460
commit c5fa27475d
8 changed files with 1003 additions and 40 deletions

View File

@ -33,7 +33,7 @@ q5 floor(STD(u_custKey))
q5 6749
SELECT 'q6', floor(STD(u_bigcustKey)) FROM customer;
q6 floor(STD(u_bigcustKey))
q6 6688
q6 6749
SELECT 'q7', AVG(u_custKey) FROM customer;
q7 AVG(u_custKey)
q7 4294007575.1667