ryanschneider opened a new issue, #1983: URL: https://github.com/apache/datafusion-sqlparser-rs/issues/1983
DuckDB allows both "string" and identifier values for the `part` in its `EXTRACT(part FROM date)` function: https://duckdb.org/docs/stable/sql/functions/date.html#extractpart-from-date For example: ``` > duckdb DuckDB v1.3.0 (Ossivalis) 71c5c07cdd Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. D SELECT EXTRACT('hour' FROM current_localtimestamp()); ┌──────────────────────────────────────────────────┐ │ main.date_part('hour', current_localtimestamp()) │ │ int64 │ ├──────────────────────────────────────────────────┤ │ 9 │ └──────────────────────────────────────────────────┘ ``` However the parser fails on this syntax w/ error: `ParserError("Expected: date/time field, found: 'hour'")` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
