trino
trino copied to clipboard
DROP VIEW prepared statement fails when view qualified name requires quoting
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"
cc: @kasiafi similar to https://github.com/trinodb/trino/pull/11171 but for a different visitor.
@lucasdlemos do you plan to make a PR for this?
Unfortunately I can't in the short term @findepi.
@findepi @hashhar i could work on this issue. Thanks