From 2fa4bb9ade02d3e6c8ecb3995fea69af5771dc9c Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Tue, 4 Jun 2024 13:42:22 +0800 Subject: [PATCH] add comments Signed-off-by: Bugen Zhao --- e2e_test/error_ui/simple/expr.slt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/e2e_test/error_ui/simple/expr.slt b/e2e_test/error_ui/simple/expr.slt index 2f330bf947f47..cabe11238088f 100644 --- a/e2e_test/error_ui/simple/expr.slt +++ b/e2e_test/error_ui/simple/expr.slt @@ -1,3 +1,4 @@ +# Regular function query error select pow(114, 514); ---- @@ -9,6 +10,7 @@ Caused by these errors (recent errors listed first): 3: Numeric out of range: overflow +# Nullable arguments query error select array_position(array[1, null, 2, null], null, null::int); ---- @@ -20,6 +22,7 @@ Caused by these errors (recent errors listed first): 3: Invalid parameter start: initial position must not be null +# Operator query error select 11111111444 * 51444444444444444; ---- @@ -31,6 +34,20 @@ Caused by these errors (recent errors listed first): 3: Numeric out of range +# Cast +query error +select 'foo'::bigint; +---- +db error: ERROR: Failed to run the query + +Caused by these errors (recent errors listed first): + 1: Expr error + 2: error while evaluating expression `str_parse(foo)` + 3: Parse error: bigint invalid digit found in string + + +# Prebuild context +# TODO: not included in the error message query error select jsonb_path_exists('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min && @ <= $max)', '"foo"'); ---- @@ -42,6 +59,7 @@ Caused by these errors (recent errors listed first): 3: Invalid parameter jsonpath: "vars" argument is not an object +# Variadic arguments query error select format('%L %s', 'Hello', 'World'); ----