Skip to content

[python] Register resolved tables in SQL contexts - #1573

Draft
XiaoHongbo-Hope wants to merge 1 commit into
apache:mainfrom
XiaoHongbo-Hope:feat/python-sql-bound-table
Draft

XiaoHongbo-Hope wants to merge 1 commit into
apache:mainfrom
XiaoHongbo-Hope:feat/python-sql-bound-table

Conversation

@XiaoHongbo-Hope

Copy link
Copy Markdown
Contributor

Purpose

Allow Python SQL queries to use an already-resolved Paimon Table without loading it again through a catalog. A captured snapshot, including an explicitly empty view, must survive the transition to SQL execution.

Changes

  • Add SQLContext.register_table(name, table) using the existing Paimon table provider and blob reader registry. Existing names are rejected.
  • Expose detached session table overrides and the current catalog/database so callers can capture SQL definitions without maintaining a second SET/RESET state machine.

Used by apache/paimon#11595 for single-node SQL materialized views. This PR adds no materialized-view DDL or storage metadata.

Validation

34 resolved-table Python tests passed, including captured and empty snapshots, duplicate registration, SQL array projection, and SET/RESET metadata isolation. The native binding builds successfully; formatting and diff checks pass.

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