mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-04 14:28:22 +00:00
Parse SUBSTR
as alias for SUBSTRING
(#1769)
This commit is contained in:
parent
f487cbe004
commit
939fbdd4f6
7 changed files with 32 additions and 4 deletions
|
@ -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]
|
||||
|
|
|
@ -1133,6 +1133,7 @@ fn parse_substring_in_select() {
|
|||
(number("1")).with_empty_span()
|
||||
))),
|
||||
special: true,
|
||||
shorthand: false,
|
||||
})],
|
||||
into: None,
|
||||
from: vec![TableWithJoins {
|
||||
|
|
|
@ -2590,6 +2590,7 @@ fn parse_substring_in_select() {
|
|||
(number("1")).with_empty_span()
|
||||
))),
|
||||
special: true,
|
||||
shorthand: false,
|
||||
})],
|
||||
into: None,
|
||||
from: vec![TableWithJoins {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue