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

"WITH" clause with comments, temporary table name is wrong. #374

Open
rkamite opened this issue Mar 17, 2023 · 0 comments
Open

"WITH" clause with comments, temporary table name is wrong. #374

rkamite opened this issue Mar 17, 2023 · 0 comments

Comments

@rkamite
Copy link

rkamite commented Mar 17, 2023

I have version v4.4.0

Here is a SQL having "WITH" clause with comments.

with
-- comment for temporary table
TEMP_TABLE_NAME as (select ... )

temporary table should ber TEMP_TABLE_NAME but -- comment for temporary table.

"WITH" clause is tokenized as below

  • --comment for temporary table
  • TEMP_TABLE_NAME
  • as
  • (select ...)

Currently, the first token is always interpreted as a temporary table name.
"the first token excluded comments" should be interpreted as a temporary table name.

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