2022-09-01 10:20:00 +00:00
|
|
|
-- #40014
|
2023-02-17 16:50:20 +00:00
|
|
|
CREATE TABLE m0 (id UInt64) ENGINE=MergeTree ORDER BY id SETTINGS index_granularity = 1, ratio_of_defaults_for_sparse_serialization = 1.0;
|
2022-08-19 12:24:22 +00:00
|
|
|
INSERT INTO m0 SELECT number FROM numbers(10);
|
2023-02-17 16:50:20 +00:00
|
|
|
CREATE TABLE m1 (id UInt64, s String) ENGINE=MergeTree ORDER BY id SETTINGS index_granularity = 1, ratio_of_defaults_for_sparse_serialization = 1.0;
|
2022-08-19 12:24:22 +00:00
|
|
|
INSERT INTO m1 SELECT number, 'boo' FROM numbers(10);
|
|
|
|
CREATE VIEW m1v AS SELECT id FROM m1;
|
|
|
|
|
|
|
|
CREATE TABLE m2 (id UInt64) ENGINE=Merge(currentDatabase(),'m0|m1v');
|
|
|
|
|
2022-09-01 10:20:00 +00:00
|
|
|
SELECT * FROM m2 WHERE id > 1 AND id < 5 ORDER BY id SETTINGS force_primary_key=1, max_bytes_to_read=64;
|
|
|
|
|
|
|
|
-- #40706
|
|
|
|
CREATE VIEW v AS SELECT 1;
|
|
|
|
SELECT 1 FROM merge(currentDatabase(), '^v$');
|