mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-30 18:57:21 +00:00
Allow single quotes in EXTRACT() for Redshift. (#1795)
Co-authored-by: Roman Borschel <roman@cluvio.com>
This commit is contained in:
parent
a847e44105
commit
3ed4ad9c66
2 changed files with 10 additions and 0 deletions
|
@ -121,4 +121,8 @@ impl Dialect for RedshiftSqlDialect {
|
||||||
fn supports_array_typedef_with_brackets(&self) -> bool {
|
fn supports_array_typedef_with_brackets(&self) -> bool {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn allow_extract_single_quotes(&self) -> bool {
|
||||||
|
true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -391,3 +391,9 @@ fn test_parse_nested_quoted_identifier() {
|
||||||
.parse_sql_statements(r#"SELECT 1 AS ["1]"#)
|
.parse_sql_statements(r#"SELECT 1 AS ["1]"#)
|
||||||
.is_err());
|
.is_err());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn parse_extract_single_quotes() {
|
||||||
|
let sql = "SELECT EXTRACT('month' FROM my_timestamp) FROM my_table";
|
||||||
|
redshift().verified_stmt(&sql);
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue