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

DROP VIEW prepared statement fails when view qualified name requires quoting #14196

Closed
lucasdlemos opened this issue Sep 19, 2022 · 4 comments · Fixed by #14276
Closed

DROP VIEW prepared statement fails when view qualified name requires quoting #14196

lucasdlemos opened this issue Sep 19, 2022 · 4 comments · Fixed by #14276
Labels
bug Something isn't working

Comments

@lucasdlemos
Copy link
Member

The parser is throwing ParsingException for valid DROP VIEW IF EXISTS query. Although properly quoted, it seems the quotes aren't being considered.

For example:

  • This statement throws ParsingException
PREPARE statement1 FROM DROP VIEW IF EXISTS "catalog-test"."schema"."table"
  • While the same statement for tables succeeds:
PREPARE statement1 FROM DROP TABLE IF EXISTS "catalog-test"."schema"."table"
  • If we replace dashes with underscores in the 1st statement it also succeeds:
PREPARE statement1 FROM DROP VIEW IF EXISTS "catalog_test"."schema"."table"
@lucasdlemos lucasdlemos added the bug Something isn't working label Sep 19, 2022
@hashhar
Copy link
Member

hashhar commented Sep 19, 2022

cc: @kasiafi similar to #11171 but for a different visitor.

@findepi findepi changed the title Drop View If Exists Prepared Statement incorrectly throwing ParsingException DROP VIEW prepared statement fails when view qualified name requires quoting Sep 19, 2022
@findepi
Copy link
Member

findepi commented Sep 19, 2022

@lucasdlemos do you plan to make a PR for this?

@lucasdlemos
Copy link
Member Author

lucasdlemos commented Sep 20, 2022

Unfortunately I can't in the short term @findepi.

@albericgenius
Copy link
Contributor

albericgenius commented Sep 24, 2022

@findepi @hashhar
i could work on this issue.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

4 participants