Add a test

This commit is contained in:
Alexey Milovidov 2022-09-18 01:21:33 +02:00
parent 6f1878b12a
commit 416b5c701b
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,12 @@
0.347
0.5
0.347
0.347
[nan]
[nan]
[nan]
[nan]
[0]
\N
[nan]
[0,0]

View File

@ -0,0 +1,14 @@
SELECT round(arrayJoin(categoricalInformationValue(x.1, x.2)), 3) FROM (SELECT arrayJoin([(0, 0), (NULL, 2), (1, 0), (1, 1)]) AS x);
SELECT corr(c1, c2) FROM VALUES((0, 0), (NULL, 2), (1, 0), (1, 1));
SELECT round(arrayJoin(categoricalInformationValue(c1, c2)), 3) FROM VALUES((0, 0), (NULL, 2), (1, 0), (1, 1));
SELECT round(arrayJoin(categoricalInformationValue(c1, c2)), 3) FROM VALUES((0, 0), (NULL, 1), (1, 0), (1, 1));
SELECT categoricalInformationValue(c1, c2) FROM VALUES((0, 0), (NULL, 1));
SELECT categoricalInformationValue(c1, c2) FROM VALUES((NULL, 1)); -- { serverError 43 }
SELECT categoricalInformationValue(dummy, dummy);
SELECT categoricalInformationValue(dummy, dummy) WHERE 0;
SELECT categoricalInformationValue(c1, c2) FROM VALUES((toNullable(0), 0));
SELECT groupUniqArray(*) FROM VALUES(toNullable(0));
SELECT groupUniqArray(*) FROM VALUES(NULL);
SELECT categoricalInformationValue(c1, c2) FROM VALUES((NULL, NULL)); -- { serverError 43 }
SELECT categoricalInformationValue(c1, c2) FROM VALUES((0, 0), (NULL, 0));
SELECT quantiles(0.5, 0.9)(c1) FROM VALUES(0::Nullable(UInt8));