mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-24 07:54:06 +00:00
Parse SUBSTRING
FROM
syntax in all dialects, reflect change in the AST (#1173)
This commit is contained in:
parent
929c646bba
commit
6b03a259aa
7 changed files with 47 additions and 95 deletions
|
@ -1911,7 +1911,7 @@ fn parse_substring_in_select() {
|
|||
let sql = "SELECT DISTINCT SUBSTRING(description, 0, 1) FROM test";
|
||||
match mysql().one_statement_parses_to(
|
||||
sql,
|
||||
"SELECT DISTINCT SUBSTRING(description FROM 0 FOR 1) FROM test",
|
||||
"SELECT DISTINCT SUBSTRING(description, 0, 1) FROM test",
|
||||
) {
|
||||
Statement::Query(query) => {
|
||||
assert_eq!(
|
||||
|
@ -1927,7 +1927,7 @@ fn parse_substring_in_select() {
|
|||
})),
|
||||
substring_from: Some(Box::new(Expr::Value(number("0")))),
|
||||
substring_for: Some(Box::new(Expr::Value(number("1")))),
|
||||
special: false,
|
||||
special: true,
|
||||
})],
|
||||
into: None,
|
||||
from: vec![TableWithJoins {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue