mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
ISSUES-3885 temporarily disable predicate optimization for order by
This commit is contained in:
parent
aa06005a32
commit
7dd897f2e6
@ -0,0 +1,7 @@
|
||||
2000-01-01 1 test string 1 1 1
|
||||
2000-01-01 1 test string 1 1 1
|
||||
2000-01-01 1 test string 1 1 1
|
||||
1
|
||||
1 a 0
|
||||
2 b 0
|
||||
2 a 0
|
@ -0,0 +1,30 @@
|
||||
SET send_logs_level = 'none';
|
||||
|
||||
DROP TABLE IF EXISTS test.test;
|
||||
CREATE TABLE test.test(date Date, id Int8, name String, value Int64, sign Int8) ENGINE = CollapsingMergeTree(sign) ORDER BY (id, date);
|
||||
|
||||
INSERT INTO test.test VALUES('2000-01-01', 1, 'test string 1', 1, 1);
|
||||
INSERT INTO test.test VALUES('2000-01-01', 2, 'test string 2', 2, 1);
|
||||
|
||||
SET enable_optimize_predicate_expression = 1;
|
||||
|
||||
SELECT * FROM (SELECT * FROM test.test FINAL) WHERE id = 1;
|
||||
SELECT * FROM (SELECT * FROM test.test LIMIT 1) WHERE id = 1;
|
||||
SELECT * FROM (SELECT * FROM test.test ORDER BY id) WHERE id = 1;
|
||||
SELECT * FROM (SELECT id FROM test.test GROUP BY id LIMIT 1 BY id) WHERE id = 1;
|
||||
SELECT n, z, changed FROM (
|
||||
SELECT n, z, runningDifferenceStartingWithFirstValue(n) AS changed FROM (
|
||||
SELECT ts, n,z FROM system.one ARRAY JOIN [1,3,4,5,6] AS ts,
|
||||
[1,2,2,2,1] AS n, ['a', 'a', 'b', 'a', 'b'] AS z
|
||||
ORDER BY n, ts DESC
|
||||
)
|
||||
) WHERE changed = 0;
|
||||
|
||||
SET force_primary_key = 1;
|
||||
|
||||
SELECT * FROM (SELECT * FROM test.test FINAL) WHERE id = 1; -- { serverError 277 }
|
||||
SELECT * FROM (SELECT * FROM test.test LIMIT 1) WHERE id = 1; -- { serverError 277 }
|
||||
SELECT * FROM (SELECT * FROM test.test ORDER BY id) WHERE id = 1; -- { serverError 277 }
|
||||
SELECT * FROM (SELECT id FROM test.test GROUP BY id LIMIT 1 BY id) WHERE id = 1; -- { serverError 277 }
|
||||
|
||||
DROP TABLE IF EXISTS test.test;
|
Loading…
Reference in New Issue
Block a user