mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
add quantile tests
This commit is contained in:
parent
65670bc33a
commit
4b9a1390ff
@ -19,3 +19,11 @@ nan
|
||||
nan
|
||||
nan
|
||||
0
|
||||
----quantile----
|
||||
45
|
||||
0
|
||||
nan
|
||||
nan
|
||||
nan
|
||||
nan
|
||||
nan
|
||||
|
@ -139,4 +139,17 @@ SELECT corr(x_value, y_value) FROM (SELECT x_value, y_value FROM test.series LIM
|
||||
|
||||
SELECT round(abs(corr(x_value, y_value) - covarPop(x_value, y_value) / (stddevPop(x_value) * stddevPop(y_value))), 6) FROM test.series;
|
||||
|
||||
/* quantile AND quantileExact */
|
||||
SELECT '----quantile----';
|
||||
|
||||
SELECT quantileExactIf(number, number > 0) FROM numbers(90);
|
||||
|
||||
SELECT quantileExactIf(number, number > 100) FROM numbers(90);
|
||||
SELECT quantileExactIf(toFloat32(number) , number > 100) FROM numbers(90);
|
||||
SELECT quantileExactIf(toFloat64(number) , number > 100) FROM numbers(90);
|
||||
|
||||
SELECT quantileIf(number, number > 100) FROM numbers(90);
|
||||
SELECT quantileIf(toFloat32(number) , number > 100) FROM numbers(90);
|
||||
SELECT quantileIf(toFloat64(number) , number > 100) FROM numbers(90);
|
||||
|
||||
DROP TABLE test.series;
|
||||
|
Loading…
Reference in New Issue
Block a user