Closed
Description
Per the Snowflake docs, EXTRACT
functions can be written one of two ways:
SELECT
EXTRACT(hour from foo)
FROM bar
SELECT
EXTRACT('hour', foo) -- or unquoted hour
FROM bar
This will result in a parse error:
ParseError(ParserError("Expected: date/time field, found: 'hour' at Line: 14, Column: 13"))
The parse_extract_expr()
method on the Parser
explicitly expects a FROM
keyword:
https://github.com/sqlparser-rs/sqlparser-rs/blob/1e209d87415a5adfedccac8cee3e2860122e4acb/src/parser/mod.rs#L1682-L1692
Metadata
Metadata
Assignees
Labels
No labels