ClickHouse/tests/queries/0_stateless/02845_prewhere_preserve_column.sql
Yakov Olkhovskiy 91929fb7e9 test is added
2023-08-17 01:29:23 +00:00

10 lines
344 B
SQL

DROP TABLE IF EXISTS 02845_prewhere;
SET move_all_conditions_to_prewhere = 1;
CREATE TABLE 02845_prewhere ( e String, c String, q String ) ENGINE = MergeTree ORDER BY tuple();
INSERT INTO 02845_prewhere SELECT number, number, number from numbers(10);
SELECT * FROM (SELECT * FROM 02845_prewhere WHERE e = '5' OR q = '6') WHERE (q = '6');