Skip to content

Commit

Permalink
fix error message
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
  • Loading branch information
BugenZhao committed Apr 10, 2023
1 parent d92cb49 commit 71ae9a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions e2e_test/batch/functions/substr.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ select substr('W7Jc3Vyufj', (INT '-2147483648'));
----
W7Jc3Vyufj

statement error length in substr should be non-negative
statement error negative substring length not allowed
select substr('W7Jc3Vyufj', INT '-2147483648', INT '-2147483648');

query T
Expand All @@ -26,4 +26,4 @@ select substr('W7Jc3Vyufj', INT '-2147483648', INT '2147483647');
query T
select substr('a', 2147483646, 1);
----
(empty)
(empty)
2 changes: 1 addition & 1 deletion src/tests/sqlsmith/src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ fn is_numeric_overflow_error(db_error: &str) -> bool {

/// Negative substr error
fn is_neg_substr_error(db_error: &str) -> bool {
db_error.contains("length in substr should be non-negative")
db_error.contains("negative substring length not allowed")
}

/// Certain errors are permitted to occur. This is because:
Expand Down

0 comments on commit 71ae9a9

Please sign in to comment.