-
Notifications
You must be signed in to change notification settings - Fork 31
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
Edge case: Support query expression starting with paren as SelectStatement #196
Comments
Thank you for pointing it out. I created a quick fix on the current regular expression: #197. If we'll find a critical limitation of current regular expression style to match the statement, we may need to move to hybrid approach with query parsing (using like memefish) & regular expression to support some spanner-cli unique statements (e.g. |
Yeah, I think there is no problem to use regex to statement kind detection, but it is possible to use memefish.
|
If we can detect the statement just by using lexer and looking at the first non-hint token, I think it's not much difference than using regular expression. Maybe we can come back this topic again once we find the critical limitation of current regex style. |
Yeah ,I don't think it is a significant difference.
|
I have found a edge case that query expression starting with paren is a valid statement, but it has failed in spanner-cli.
In
gcloud spanner databases execute-sql
, it has succeeded.https://cloud.google.com/spanner/docs/reference/standard-sql/query-syntax#sql_syntax
I expects it will be important when pipe syntax is available.
(In this case, paren is actually not required.)
The text was updated successfully, but these errors were encountered: