added a test from @cloudXane

This commit is contained in:
Anton Popov 2020-05-07 01:48:44 +03:00
parent cbbd8e521c
commit e3a8712e15
2 changed files with 14 additions and 11 deletions

View File

@ -3,8 +3,6 @@
2020-05-05 01:00:00 2 2020-05-05 01:00:00 2
2020-05-05 01:00:00 3 2020-05-05 01:00:00 3
2020-05-05 01:00:00 4 2020-05-05 01:00:00 4
999999 111 9999999 9999999
999999 111 9999998 9999998
999999 111 9999997 9999997
999998
999998

View File

@ -9,11 +9,16 @@ SELECT * FROM pk_func ORDER BY toDate(d), ui LIMIT 5;
DROP TABLE pk_func; DROP TABLE pk_func;
CREATE TABLE pk_func(i UInt32) ENGINE = MergeTree ORDER BY -i; CREATE TABLE nORX (`A` Int64, `B` Int64, `V` Int64) ENGINE = MergeTree ORDER BY (A, negate(B));
INSERT INTO pk_func SELECT number FROM numbers(1000000); INSERT INTO nORX SELECT 111, number, number FROM numbers(10000000);
INSERT INTO pk_func SELECT number FROM numbers(1000000);
INSERT INTO pk_func SELECT number FROM numbers(1000000);
SELECT * FROM pk_func ORDER BY -i LIMIT 5; SELECT *
FROM nORX
WHERE B >= 1000
ORDER BY
A ASC,
-B ASC
LIMIT 3
SETTINGS max_threads = 1;
DROP TABLE pk_func; DROP TABLE nORX;