Closed cploonker closed 2 hours ago
there generated query shouldn’t fail. can you validate that?
sqlglot is not a validator. but it tries to generate valid sql
@tobymao you are right. The generated query from sqlglot does not fail. But the original query does. I thought if there was a STRICT mode for the parser which will throw error then i could have used it. But i understand.
BTW I am a huge fan of Sqlglot. There is no equivalent for it. And we can achieve some seemingly impossible sql manipulation using Sqlglot. It is just pure magic.
Before you file an issue
parse_one(sql, read="spark")
ast.sql(dialect="duckdb")
Fully reproducible code snippet Please include a fully reproducible code snippet or the input sql, dialect, and expected output. It is actually great that SQLglot parsing is resilient to simple syntax errors. Kudos for handling this. However, sometimes we need to get these errors because the query will ultimately fail when executed. Is there a parser flag which can show this type of syntax error.
Official Documentation Please include links to official SQL documentation related to your issue.