Skip to content
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

get_type returns UNKNOWN if first token is Parenthesis #727

Open
palash247 opened this issue Jul 6, 2023 · 1 comment
Open

get_type returns UNKNOWN if first token is Parenthesis #727

palash247 opened this issue Jul 6, 2023 · 1 comment

Comments

@palash247
Copy link

The issue:

q1 = '(select 1 as "a") UNION (select 2 as "a")'
q2 = 'select 1 as "a" UNION select 2 as "a"'
sqlparse.parse(q1)[0].get_type()
'UNKNOWN'
sqlparse.parse(q2)[0].get_type()
'SELECT'

@palash247
Copy link
Author

Please assign the issue to me if accepted.

@palash247 palash247 changed the title get_type returns UNKNOWN if first token is Parentheses get_type returns UNKNOWN if first token is Parenthesis Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant