Disable query_plan_filter_push_down.

This commit is contained in:
Nikolai Kochetov 2021-06-16 20:51:16 +03:00
parent 9f025cd405
commit 3d7100ca60
3 changed files with 27 additions and 1 deletions

View File

@ -467,7 +467,7 @@ class IColumn;
\
M(Bool, query_plan_enable_optimizations, true, "Apply optimizations to query plan", 0) \
M(UInt64, query_plan_max_optimizations_to_apply, 10000, "Limit the total number of optimizations applied to query plan. If zero, ignored. If limit reached, throw exception", 0) \
M(Bool, query_plan_filter_push_down, true, "Allow to push down filter by predicate query plan step", 0) \
M(Bool, query_plan_filter_push_down, false, "Allow to push down filter by predicate query plan step", 0) \
\
M(UInt64, limit, 0, "Limit on read rows from the most 'end' result for select query, default 0 means no limit length", 0) \
M(UInt64, offset, 0, "Offset on read rows from the most 'end' result for select query", 0) \

View File

@ -0,0 +1,6 @@
1 0
2 0
3 0
4 0
5 0
6 0

View File

@ -0,0 +1,20 @@
DROP TABLE IF EXISTS test;
CREATE TABLE test
(
`t` UInt8,
`flag` UInt8,
`id` UInt8
)
ENGINE = MergeTree
PARTITION BY t
ORDER BY (t, id)
SETTINGS index_granularity = 8192;
INSERT INTO test VALUES (1,0,1),(1,0,2),(1,0,3),(1,0,4),(1,0,5),(1,0,6),(1,1,7),(0,0,7);
SELECT id, flag FROM test t1
INNER JOIN (SELECT DISTINCT id FROM test) AS t2 ON t1.id = t2.id
WHERE flag = 0 and t = 1 AND id NOT IN (SELECT 1 WHERE 0);
DROP TABLE IF EXISTS test;