Added test.

This commit is contained in:
Nikolai Kochetov 2020-06-30 13:56:23 +03:00
parent 820d2c63df
commit b5fbd62a6f
2 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,8 @@
SELECT arrayExists(x -> ((x.1) = 'pattern'), cast([tuple('a', 1)] as Array(Tuple(LowCardinality(String), UInt8))));
DROP TABLE IF EXISTS table;
CREATE TABLE table (id Int32, values Array(Tuple(LowCardinality(String), Int32)), date Date) ENGINE MergeTree() PARTITION BY toYYYYMM(date) ORDER BY (id, date);
SELECT count(*) FROM table WHERE (arrayExists(x -> ((x.1) = toLowCardinality('pattern')), values) = 1);
DROP TABLE IF EXISTS table;