ClickHouse/tests/queries/0_stateless/02575_merge_prewhere_default_expression.reference
Azat Khuzhin 86e9b131c7 Allow PREWHERE for Merge with different DEFAULT expression for column
It can be not that special to have Merge engine w/o default expression,
while MergeTree will have it. So improve PREWHERE for such kinds, and
also allow PREWHERE for DEFAULT and MATERIALIZED (since both are
physical columns on disk and this make sense).

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-24 16:33:49 +01:00

9 lines
256 B
Plaintext

-- { echoOn }
SELECT * FROM m PREWHERE a = 'OK' ORDER BY a, f;
OK 1
OK 2
SELECT * FROM m PREWHERE f = 1 ORDER BY a, f;
OK 1
SELECT * FROM m WHERE f = 0 SETTINGS optimize_move_to_prewhere=0;
SELECT * FROM m WHERE f = 0 SETTINGS optimize_move_to_prewhere=1;