Replies: 1 comment 1 reply
-
you can use the find, find_all, walk apis on expression. you can walk / search the AST to find these issues. the first one is the trickiest because engines can do predicate push down which a simple AST search wouldn't find. for that case, you can first run the sqlglot optimizer to do predicate pushdown, before going back and looking for your custom rules. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to use sqlglot as a validating tool. This is if a user writes a query
then the user should see a warning-comment after formatting the query.
What is the best way to implement this kind of custom logic?
Beta Was this translation helpful? Give feedback.
All reactions