Open pgrivachev opened 3 years ago
If it failed to parse, there is no AST to return. The error object returned should include the error location in the input SQL string, and depending on the Options you pass and which API you're calling, that location can be included automatically in the error string to show a highlight of where the error occurred.
Thank you @jshute111!
Yes, I successfully use the response from ZetaSQL with error position to highlight words in SQL:
But my idea was that if I can get AST I can suggest customer to insert some table names like this (for valid sql):
It is hard to understand cursor context without AST. Do you have any plans to return AST for error state if possible?
I sucessfully use ZetaSQL to obtain AST for different queries. But if query contain any issue, I receive only error. For example for the query
I will get only the following error and no any AST:
Is it possible to get some kind of AST for such SQL queries with issues or for incomplete queries?