Skip to content

Visit CreateView name as a relation - #2442

Open
sabir-akhadov-localstack wants to merge 1 commit into
apache:mainfrom
localstack:pr/06-create-view-visit-relation
Open

Visit CreateView name as a relation#2442
sabir-akhadov-localstack wants to merge 1 commit into
apache:mainfrom
localstack:pr/06-create-view-visit-relation

Conversation

@sabir-akhadov-localstack

Copy link
Copy Markdown
Contributor

visit_relations / visit_relations_mut did not visit the view name in CREATE VIEW statements:

let statements = Parser::parse_sql(&GenericDialect {}, "CREATE VIEW db1.v AS SELECT * FROM t")?;
// visit_relations yielded only `t`, not `db1.v`

CreateTable, CreateIndex, Msck, and AlterTable already annotate their object names with visit(with = "visit_relation")CreateView.name was missing the annotation. This PR adds it, so tools that inspect or rewrite relation references (e.g. schema rewriters) see the view name too.

The visitor framework skipped CreateView.name, so visit_relations /
visit_relations_mut did not surface or rewrite the view name in
CREATE VIEW statements, unlike CreateTable, CreateIndex, and AlterTable
which already annotate their names with visit_relation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sabir-akhadov-localstack
sabir-akhadov-localstack marked this pull request as ready for review August 18, 2026 09:47
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

Successfully merging this pull request may close these issues.

1 participant