From a4b261b82c6d13b1f206650757979e3cb26a7ede Mon Sep 17 00:00:00 2001 From: lmatz Date: Sun, 22 Dec 2024 17:05:33 +0800 Subject: [PATCH] add more test cases --- e2e_test/batch/order/test_limit.slt.part | 33 +++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/e2e_test/batch/order/test_limit.slt.part b/e2e_test/batch/order/test_limit.slt.part index 6a7a4bc978fd1..9bcf832215ff4 100644 --- a/e2e_test/batch/order/test_limit.slt.part +++ b/e2e_test/batch/order/test_limit.slt.part @@ -215,12 +215,43 @@ SELECT * FROM generate_series(0,3,1) as t(v) order by v limit NULL + 1; 0 1 2 +3 + +query I +SELECT * FROM generate_series(0,3,1) as t(v) order by v limit NULL + '1'::bigint; +---- +0 +1 +2 +3 + +statement error +SELECT * FROM generate_series(0,3,1) as t(v) order by v limit NULL + '1'; + +statement error +SELECT * FROM generate_series(0,3,1) as t(v) order by v limit NULL + '1'::jsonb; query I -SELECT * FROM generate_series(0,3,1) as t(v) order by v limit 1.1::Decimal; +SELECT * FROM generate_series(0,3,1) as t(v) order by v limit 2.1::Decimal; ---- 0 +1 + +statement error +SELECT * FROM generate_series(0,3,1) as t(v) order by v limit '1'::jsonb; + + +query I +SELECT * FROM generate_series(0,3,1) as t(v) order by v limit '2'; +---- +0 +1 +statement error +SELECT * FROM generate_series(0,3,1) as t(v) order by v limit '-2'; + +statement error +SELECT * FROM generate_series(0,3,1) as t(v) order by v limit '2.2'; # Subqueries that return negative values statement error