Fix 01576_alias_column_rewrite

This commit is contained in:
Nikolai Kochetov 2023-08-31 13:16:55 +00:00
parent a1024813ec
commit e718dd8702
2 changed files with 30 additions and 30 deletions

View File

@ -21,34 +21,34 @@ array-join
lambda
1
optimize_read_in_order
Expression (Projection)
Limit (preliminary LIMIT (without OFFSET))
Sorting (Sorting for ORDER BY)
Expression (Before ORDER BY)
ReadFromMergeTree (default.test_table)
Expression (Projection)
Limit (preliminary LIMIT (without OFFSET))
Sorting (Sorting for ORDER BY)
Expression (Before ORDER BY)
ReadFromMergeTree (default.test_table)
Expression ((Projection + Before ORDER BY [lifted up part]))
Limit (preliminary LIMIT (without OFFSET))
Sorting (Sorting for ORDER BY)
Expression (Before ORDER BY)
ReadFromMergeTree (default.test_table)
Expression
Limit
Sorting
Expression
ReadFromMergeTree
Expression
Limit
Sorting
Expression
ReadFromMergeTree
Expression
Limit
Sorting
Expression
ReadFromMergeTree
optimize_aggregation_in_order
Expression ((Projection + Before ORDER BY))
Expression
Aggregating
Expression (Before GROUP BY)
ReadFromMergeTree (default.test_table)
Expression ((Projection + Before ORDER BY))
Expression
ReadFromMergeTree
Expression
Aggregating
Expression (Before GROUP BY)
ReadFromMergeTree (default.test_table)
Expression ((Projection + Before ORDER BY))
Expression
ReadFromMergeTree
Expression
Aggregating
Expression (Before GROUP BY)
ReadFromMergeTree (default.test_table)
Expression
ReadFromMergeTree
second-index
1
1

View File

@ -81,15 +81,15 @@ SELECT count() == 10 FROM test_table WHERE arrayMap((day) -> day + 1, [1,2,3])
set max_rows_to_read = 0;
SELECT 'optimize_read_in_order';
EXPLAIN SELECT day AS s FROM test_table ORDER BY s LIMIT 1 SETTINGS optimize_read_in_order = 0;
EXPLAIN SELECT day AS s FROM test_table ORDER BY s LIMIT 1 SETTINGS optimize_read_in_order = 1;
EXPLAIN SELECT toDate(timestamp) AS s FROM test_table ORDER BY toDate(timestamp) LIMIT 1 SETTINGS optimize_read_in_order = 1;
EXPLAIN description = 0 SELECT day AS s FROM test_table ORDER BY s LIMIT 1 SETTINGS optimize_read_in_order = 0;
EXPLAIN description = 0 SELECT day AS s FROM test_table ORDER BY s LIMIT 1 SETTINGS optimize_read_in_order = 1;
EXPLAIN description = 0 SELECT toDate(timestamp) AS s FROM test_table ORDER BY toDate(timestamp) LIMIT 1 SETTINGS optimize_read_in_order = 1;
SELECT 'optimize_aggregation_in_order';
EXPLAIN SELECT day, count() AS s FROM test_table GROUP BY day SETTINGS optimize_aggregation_in_order = 0;
EXPLAIN SELECT day, count() AS s FROM test_table GROUP BY day SETTINGS optimize_aggregation_in_order = 1;
EXPLAIN SELECT toDate(timestamp), count() AS s FROM test_table GROUP BY toDate(timestamp) SETTINGS optimize_aggregation_in_order = 1;
EXPLAIN description = 0 SELECT day, count() AS s FROM test_table GROUP BY day SETTINGS optimize_aggregation_in_order = 0;
EXPLAIN description = 0 SELECT day, count() AS s FROM test_table GROUP BY day SETTINGS optimize_aggregation_in_order = 1;
EXPLAIN description = 0 SELECT toDate(timestamp), count() AS s FROM test_table GROUP BY toDate(timestamp) SETTINGS optimize_aggregation_in_order = 1;
DROP TABLE test_table;