We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Per the Snowflake docs, EXTRACT functions can be written one of two ways:
EXTRACT
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
parse_extract_expr()
Parser
FROM
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Per the Snowflake docs,
EXTRACT
functions can be written one of two ways: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 theParser
explicitly expects aFROM
keyword:https://github.com/sqlparser-rs/sqlparser-rs/blob/1e209d87415a5adfedccac8cee3e2860122e4acb/src/parser/mod.rs#L1682-L1692
The text was updated successfully, but these errors were encountered: