diff --git a/tests/queries/0_stateless/01268_mergine_sorted_limit.reference b/tests/queries/0_stateless/01268_mergine_sorted_limit.reference new file mode 100644 index 00000000000..14ecec1ff1d --- /dev/null +++ b/tests/queries/0_stateless/01268_mergine_sorted_limit.reference @@ -0,0 +1,7 @@ +1 1 +1 2 +1 3 +1 1 +1 2 +1 3 +1 4 diff --git a/tests/queries/0_stateless/01268_mergine_sorted_limit.sql b/tests/queries/0_stateless/01268_mergine_sorted_limit.sql new file mode 100644 index 00000000000..825dc4df529 --- /dev/null +++ b/tests/queries/0_stateless/01268_mergine_sorted_limit.sql @@ -0,0 +1,12 @@ +DROP TABLE IF EXISTS tab; + +CREATE TABLE tab (x UInt32, y UInt32) ENGINE = MergeTree() ORDER BY x; + +INSERT INTO tab VALUES (1,1),(1,2),(1,3),(1,4),(1,5); + +INSERT INTO tab VALUES (2,6),(2,7),(2,8),(2,9),(2,0); + +SELECT * FROM tab ORDER BY x LIMIT 3; +SELECT * FROM tab ORDER BY x LIMIT 4; + +DROP TABLE IF EXISTS tab; \ No newline at end of file