Skip to content

How to parse a query with reserved keyword (end) in SELECT statement? #1049

Closed Answered by georgesittas
steven-luabase asked this question in Q&A
Discussion options

You must be logged in to vote

Is there a way to have sqlgot parse SELECT queries with reserved keywords in them?

Yes, that is usually solved by adding the token of interest to the ID_VAR_TOKENS set in the parser. I'm not sure what the implications of adding END will be, but I can take a look soon if needed. A PR is welcome, too. :)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tobymao
Comment options

Answer selected by georgesittas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants