2014-04-30 19:19:29 +00:00
|
|
|
CREATE DATABASE IF NOT EXISTS test;
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS big_array;
|
|
|
|
CREATE TABLE big_array (x Array(UInt8)) ENGINE=TinyLog;
|
2016-08-13 05:06:36 +00:00
|
|
|
SET min_insert_block_size_rows = 0, min_insert_block_size_bytes = 0;
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO big_array SELECT groupArray(number % 255) AS x FROM (SELECT * FROM system.numbers LIMIT 1000000);
|
2014-04-30 19:19:29 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT count() FROM big_array ARRAY JOIN x;
|
|
|
|
SELECT count() FROM big_array ARRAY JOIN x AS y;
|
|
|
|
SELECT countIf(has(x, 10)), sum(y) FROM big_array ARRAY JOIN x AS y;
|
|
|
|
SELECT countIf(has(x, 10)) FROM big_array ARRAY JOIN x AS y;
|
|
|
|
SELECT countIf(has(x, 10)), sum(y) FROM big_array ARRAY JOIN x AS y WHERE 1;
|
|
|
|
SELECT countIf(has(x, 10)) FROM big_array ARRAY JOIN x AS y WHERE 1;
|
|
|
|
SELECT countIf(has(x, 10)), sum(y) FROM big_array ARRAY JOIN x AS y WHERE has(x,15);
|
2014-04-30 19:19:29 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE big_array;
|