Skip to content

[FLINK-40637][table] Expand catalog views hermetically against the view's own database - #29165

Open
talatuyarer wants to merge 1 commit into
apache:masterfrom
talatuyarer:FLINK-40637
Open

[FLINK-40637][table] Expand catalog views hermetically against the view's own database#29165
talatuyarer wants to merge 1 commit into
apache:masterfrom
talatuyarer:FLINK-40637

Conversation

@talatuyarer

Copy link
Copy Markdown

When a CatalogView's expanded query contains unqualified table references, the planner resolved them against the reader's current session database instead of the view's own catalog/database. The same view could then succeed in one session and fail in another. This is observable with external catalogs (e.g. Iceberg) that return portable, unqualified SQL from CatalogView#getExpandedQuery().

Root cause: CatalogManager.resolveCatalogView eagerly parses the expanded query with parser.parse(...) in the session context (introduced in FLINK-37098), which qualifies unqualified references against the current session database and bypasses the hermetic view-expansion path.

@flinkbot

flinkbot commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

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.

2 participants