mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Test cases to check that row level filter is applied before prewhere actions are executed
This commit is contained in:
parent
aea5bc7527
commit
b629833ef9
@ -6,3 +6,6 @@
|
||||
195431
|
||||
195431
|
||||
5923
|
||||
200000
|
||||
200000
|
||||
6061
|
||||
|
@ -26,6 +26,11 @@ SELECT count(1) FROM test_table PREWHERE (n % 8192) < 4000;
|
||||
SELECT count(1) FROM test_table WHERE (n % 8192) < 4000;
|
||||
SELECT count(1) FROM test_table PREWHERE (n % 8192) < 4000 WHERE (n % 33) == 0;
|
||||
|
||||
-- Run queries that have division by zero if row level filter isn't applied before prewhere
|
||||
SELECT count(1) FROM test_table PREWHERE 7 / (n % 5) > 2;
|
||||
SELECT count(1) FROM test_table WHERE 7 / (n % 5) > 2;
|
||||
SELECT count(1) FROM test_table PREWHERE 7 / (n % 5) > 2 WHERE (n % 33) == 0;
|
||||
|
||||
DROP TABLE test_table;
|
||||
DROP ROW POLICY test_filter_policy ON test_table;
|
||||
DROP ROW POLICY test_filter_policy_2 ON test_table;
|
||||
|
Loading…
Reference in New Issue
Block a user