Parse SUBSTR as alias for SUBSTRING (#1769)

This commit is contained in:
Michael Victor Zink 2025-03-21 22:34:43 -07:00 committed by GitHub
parent f487cbe004
commit 939fbdd4f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 32 additions and 4 deletions

View file

@ -7607,6 +7607,9 @@ fn parse_substring() {
verified_stmt("SELECT SUBSTRING('1', 1, 3)");
verified_stmt("SELECT SUBSTRING('1', 1)");
verified_stmt("SELECT SUBSTRING('1' FOR 3)");
verified_stmt("SELECT SUBSTRING('foo' FROM 1 FOR 2) FROM t");
verified_stmt("SELECT SUBSTR('foo' FROM 1 FOR 2) FROM t");
verified_stmt("SELECT SUBSTR('foo', 1, 2) FROM t");
}
#[test]

View file

@ -1133,6 +1133,7 @@ fn parse_substring_in_select() {
(number("1")).with_empty_span()
))),
special: true,
shorthand: false,
})],
into: None,
from: vec![TableWithJoins {

View file

@ -2590,6 +2590,7 @@ fn parse_substring_in_select() {
(number("1")).with_empty_span()
))),
special: true,
shorthand: false,
})],
into: None,
from: vec![TableWithJoins {