-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
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
Bug in parsing or formatting Extract function #24
Comments
Looks like extract could become a special node type in tree pkg |
as a workaround, I am patching the AST to replace the func argument with instance of this
|
As the whole parser is mostly part of cockroachdb parser, cockroachdb treats Your workaround is excellent. Could you please submit a Pull Request for this patch? https://www.cockroachlabs.com/docs/stable/functions-and-operators.html#special-syntax-forms |
Hi,
I have a SQL statement that contains
GROUP BY EXTRACT(MONTH FROM issue_date)
After parsing this statement and writing the AST using
String()
on the root node, it returns an invalid function call section:GROUP BY extract('month', issue_date)
The text was updated successfully, but these errors were encountered: