ClickHouse/tests/queries/0_stateless/00576_nested_and_prewhere.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
638 B
MySQL
Raw Normal View History

DROP TABLE IF EXISTS nested;
2023-08-12 19:50:22 +00:00
CREATE TABLE nested (x UInt64, filter UInt8, n Nested(a UInt64)) ENGINE = MergeTree ORDER BY x SETTINGS index_granularity = 8192, index_granularity_bytes = '10Mi';
INSERT INTO nested SELECT number, number % 2, range(number % 10) FROM system.numbers LIMIT 100000;
ALTER TABLE nested ADD COLUMN n.b Array(UInt64);
2024-05-29 10:11:15 +00:00
SELECT DISTINCT n.b FROM nested PREWHERE filter ORDER BY ALL;
ALTER TABLE nested ADD COLUMN n.c Array(UInt64) DEFAULT arrayMap(x -> x * 2, n.a);
2024-05-29 10:11:15 +00:00
SELECT DISTINCT n.c FROM nested PREWHERE filter ORDER BY ALL;
SELECT DISTINCT n.a, n.c FROM nested PREWHERE filter ORDER BY ALL;
2018-02-21 01:39:46 +00:00
DROP TABLE nested;