Update 00974_final_predicate_push_down.sql

This commit is contained in:
alexey-milovidov 2019-07-25 04:07:06 +03:00 committed by GitHub
parent a985897a07
commit 26580844f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,12 +6,12 @@ CREATE TABLE test_00974
x Int32,
ver UInt64
)
ENGINE = ReplacingMergeTree(date, x, 4096);
ENGINE = ReplacingMergeTree(date, x, 1);
INSERT INTO test_00974 VALUES ('2019-07-23', 1, 1), ('2019-07-23', 1, 2);
INSERT INTO test_00974 VALUES ('2019-07-23', 2, 1), ('2019-07-23', 2, 2);
SELECT COUNT() FROM (SELECT * FROM test_00974 FINAL) where x = 1 SETTINGS allow_push_predicate_to_final_subquery = 0 FORMAT JSON ;
SELECT COUNT() FROM (SELECT * FROM test_00974 FINAL) where x = 1 SETTINGS allow_push_predicate_to_final_subquery = 1 FORMAT JSON ;
SELECT COUNT() FROM (SELECT * FROM test_00974 FINAL) where x = 1 SETTINGS allow_push_predicate_to_final_subquery = 0;
SELECT COUNT() FROM (SELECT * FROM test_00974 FINAL) where x = 1 SETTINGS allow_push_predicate_to_final_subquery = 1, max_rows_to_read = 2;
DROP TABLE test_00974;