mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +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 {
|
||||
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]"#)
|
||||
.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