Skip to content

fix: reject Paimon reads and writes on iceberg/object/lance tables - #740

Draft
plusplusjiajia wants to merge 1 commit into
apache:mainfrom
plusplusjiajia:feat/table-type-fail-closed
Draft

fix: reject Paimon reads and writes on iceberg/object/lance tables#740
plusplusjiajia wants to merge 1 commit into
apache:mainfrom
plusplusjiajia:feat/table-type-fail-closed

Conversation

@plusplusjiajia

Copy link
Copy Markdown
Member

Purpose

Follow-up to #733: the default Catalog::load_table wrapped get_table's result as LoadedTable::Paimon unconditionally, so a catalog that does not override it skipped the resolver entirely. Beyond that, a table declared iceberg-table, object-table or lance-table could still be read or written as Paimon through several other paths; this PR closes them.

Brief change log

Catalog

  • The default Catalog::load_table classifies from the loaded table's own options and goes through the checked LoadedTable::external constructor, so a catalog that only implements get_table fails closed
  • The default list_partitions refuses external tables.

Core storage boundary

  • CoreOptions::ensure_read_authorized — already called at every path that reads or mutates table storage — now also refuses an engine-served declared type; ensure_engine_can_serve keeps the auth-only half.
  • IncrementalScan::plan, TableCommit::abort (type-only) and the shared write validator gain the missing check.

Runtime type immutability

  • copy_with_options pins the stored type the way it pins query-auth.enabled.
  • copy_with_branch and copy_with_time_travel refuse external tables before any IO.

DataFusion

  • Guards kept only where core cannot cover: procedures (tag/branch managers), SHOW CREATE TABLE (no storage IO), and provider construction (validates before registering with the blob-reader registry).

@plusplusjiajia
plusplusjiajia force-pushed the feat/table-type-fail-closed branch from 87c7ef8 to b12d420 Compare August 23, 2026 15:56
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