Hi all, While adding Iceberg view support to the Flink connector (apache/iceberg#17858), we noticed a gap in Flink's Catalog API for cross-engine views.
Unlike FLINK-71's expanded query approach, multi-engine formats like Iceberg require storing explicit catalog and namespace contexts alongside the SQL. Spark's DSv2 ViewCatalog handles this by passing currentCatalog and currentNamespace during creation. Currently, Flink's Catalog#createTable lacks session context, so connectors cannot determine the database used for unqualified references. Consequently, views created outside the active session database must be rejected at creation to prevent bad runtime resolution (FLINK-40637). Proposal: Expose the session's current catalog and database during view creation (e.g., via ResolvedCatalogView or createTable context). This will allow connectors like Iceberg to persist full resolution context, removing query restrictions and enabling interop with Spark and Trino. If there is interest, I can draft a FLIP. Best, Talat
