2024-04-22 01:27:44 +00:00
|
|
|
DROP TABLE IF EXISTS t;
|
|
|
|
|
|
|
|
CREATE TABLE t
|
2024-04-20 02:18:19 +00:00
|
|
|
(
|
|
|
|
`key` Int64,
|
|
|
|
`someCol` String,
|
|
|
|
`eventTime` DateTime
|
|
|
|
)
|
|
|
|
ENGINE = ReplacingMergeTree(eventTime)
|
|
|
|
ORDER BY key;
|
|
|
|
|
2024-04-22 01:27:44 +00:00
|
|
|
INSERT INTO t Values (1, 'first', '2024-04-19 01:01:01');
|
|
|
|
INSERT INTO t Values (1, 'first', '2024-04-19 01:01:01');
|
2024-04-20 02:18:19 +00:00
|
|
|
|
2024-04-22 03:48:44 +00:00
|
|
|
SET allow_experimental_analyzer = 1;
|
|
|
|
|
2024-04-20 02:18:19 +00:00
|
|
|
EXPLAIN QUERY TREE passes=1
|
|
|
|
WITH merged_test AS(
|
2024-04-22 01:27:44 +00:00
|
|
|
SELECT * FROM t Final
|
2024-04-20 02:18:19 +00:00
|
|
|
)
|
|
|
|
SELECT * FROM merged_test;
|
|
|
|
|
|
|
|
WITH merged_test AS(
|
2024-04-22 01:27:44 +00:00
|
|
|
SELECT * FROM t Final
|
2024-04-20 02:18:19 +00:00
|
|
|
)
|
|
|
|
SELECT * FROM merged_test;
|
2024-04-22 01:27:44 +00:00
|
|
|
|
|
|
|
DROP TABLE t;
|