2022-10-25 10:35:25 +00:00
|
|
|
SET allow_experimental_analyzer = 1;
|
2022-07-19 13:25:15 +00:00
|
|
|
|
2022-11-21 16:53:06 +00:00
|
|
|
EXPLAIN QUERY TREE run_passes = 0 SELECT 1;
|
2022-07-19 13:25:15 +00:00
|
|
|
|
|
|
|
SELECT '--';
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS test_table;
|
|
|
|
CREATE TABLE test_table
|
|
|
|
(
|
|
|
|
id UInt64,
|
|
|
|
value String
|
|
|
|
) ENGINE=TinyLog;
|
|
|
|
|
|
|
|
INSERT INTO test_table VALUES (0, 'Value');
|
|
|
|
|
2022-11-21 16:53:06 +00:00
|
|
|
EXPLAIN QUERY TREE run_passes = 0 SELECT id, value FROM test_table;
|
2022-07-19 13:25:15 +00:00
|
|
|
|
|
|
|
SELECT '--';
|
|
|
|
|
|
|
|
EXPLAIN QUERY TREE run_passes = 1 SELECT id, value FROM test_table;
|
|
|
|
|
|
|
|
SELECT '--';
|
|
|
|
|
2022-11-21 16:53:06 +00:00
|
|
|
EXPLAIN QUERY TREE run_passes = 0 SELECT arrayMap(x -> x + id, [1, 2, 3]) FROM test_table;
|
2022-07-19 13:25:15 +00:00
|
|
|
|
|
|
|
SELECT '--';
|
|
|
|
|
|
|
|
EXPLAIN QUERY TREE run_passes = 1 SELECT arrayMap(x -> x + 1, [1, 2, 3]) FROM test_table;
|
|
|
|
|
|
|
|
SELECT '--';
|
|
|
|
|
2022-11-21 16:53:06 +00:00
|
|
|
EXPLAIN QUERY TREE run_passes = 0 WITH x -> x + 1 AS lambda SELECT lambda(id) FROM test_table;
|
2022-07-19 13:25:15 +00:00
|
|
|
|
|
|
|
SELECT '--';
|
|
|
|
|
|
|
|
EXPLAIN QUERY TREE run_passes = 1 WITH x -> x + 1 AS lambda SELECT lambda(id) FROM test_table;
|
|
|
|
|
|
|
|
DROP TABLE test_table;
|