File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,11 @@ impl Dialect for DuckDbDialect {
70
70
true
71
71
}
72
72
73
+ /// Returns true if this dialect allows the `EXTRACT` function to use single quotes in the part being extracted.
74
+ fn allow_extract_single_quotes ( & self ) -> bool {
75
+ true
76
+ }
77
+
73
78
// DuckDB is compatible with PostgreSQL syntax for this statement,
74
79
// although not all features may be implemented.
75
80
fn supports_explain_with_utility_options ( & self ) -> bool {
Original file line number Diff line number Diff line change @@ -869,3 +869,9 @@ fn test_duckdb_trim() {
869
869
duckdb( ) . parse_sql_statements( error_sql) . unwrap_err( )
870
870
) ;
871
871
}
872
+
873
+ #[ test]
874
+ fn parse_extract_single_quotes ( ) {
875
+ let sql = "SELECT EXTRACT('month' FROM my_timestamp) FROM my_table" ;
876
+ duckdb ( ) . verified_stmt ( sql) ;
877
+ }
You can’t perform that action at this time.
0 commit comments