mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-04 06:18:17 +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
|
@ -413,6 +413,18 @@ fn parse_single_quoted_identified() {
|
|||
sqlite().verified_only_select("SELECT 't'.*, t.'x' FROM 't'");
|
||||
// TODO: add support for select 't'.x
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_substring() {
|
||||
// SQLite supports the SUBSTRING function since v3.34, but does not support the SQL standard
|
||||
// SUBSTRING(expr FROM start FOR length) syntax.
|
||||
// https://www.sqlite.org/lang_corefunc.html#substr
|
||||
sqlite().verified_only_select("SELECT SUBSTRING('SQLITE', 3, 4)");
|
||||
sqlite().verified_only_select("SELECT SUBSTR('SQLITE', 3, 4)");
|
||||
sqlite().verified_only_select("SELECT SUBSTRING('SQLITE', 3)");
|
||||
sqlite().verified_only_select("SELECT SUBSTR('SQLITE', 3)");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_window_function_with_filter() {
|
||||
for func_name in [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue