mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Added test for the case when Nullable condition is optimized to PREWHERE #1626
This commit is contained in:
parent
bd14d22d22
commit
e5a33e6332
@ -0,0 +1 @@
|
|||||||
|
1
|
17
dbms/tests/queries/0_stateless/00543_null_and_prewhere.sql
Normal file
17
dbms/tests/queries/0_stateless/00543_null_and_prewhere.sql
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
CREATE TABLE test.test
|
||||||
|
(
|
||||||
|
dt Date,
|
||||||
|
id UInt32,
|
||||||
|
val Nullable(UInt32)
|
||||||
|
)
|
||||||
|
ENGINE = MergeTree(dt, id, 8192);
|
||||||
|
|
||||||
|
insert into test.test (dt, id, val) values ('2017-01-01', 1, 10);
|
||||||
|
insert into test.test (dt, id, val) values ('2017-01-01', 1, null);
|
||||||
|
insert into test.test (dt, id, val) values ('2017-01-01', 1, 0);
|
||||||
|
|
||||||
|
SELECT count()
|
||||||
|
FROM test.test
|
||||||
|
WHERE val = 0;
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS test.test;
|
Loading…
Reference in New Issue
Block a user