mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-05 14:02:21 +00:00
22 lines
519 B
SQL
22 lines
519 B
SQL
DROP TABLE IF EXISTS bug_36995;
|
|
|
|
CREATE TABLE bug_36995(
|
|
`time` DateTime,
|
|
`product` String)
|
|
ENGINE = MergeTree
|
|
ORDER BY time AS
|
|
SELECT '2022-01-01 00:00:00','1';
|
|
|
|
SELECT * FROM bug_36995
|
|
WHERE (time IS NOT NULL) AND (product IN (SELECT '1'))
|
|
SETTINGS optimize_move_to_prewhere = 1;
|
|
|
|
SELECT * FROM bug_36995
|
|
WHERE (time IS NOT NULL) AND (product IN (SELECT '1'))
|
|
SETTINGS optimize_move_to_prewhere = 0;
|
|
|
|
SELECT * FROM bug_36995
|
|
PREWHERE (time IS NOT NULL) WHERE (product IN (SELECT '1'));
|
|
|
|
DROP TABLE bug_36995;
|