Problem
The Iceberg REST catalog returns NotSupported for CREATE OR REPLACE / REPLACE TABLE.
Proposal
Atomic replace via update_table + AssertTableUuid — load the existing table, stage schema/spec/sort/property updates, and commit in one server-side transaction. No drop, so the table UUID, location and snapshot history are preserved by construction. Stale user properties are removed; catalog-managed keys are kept.
table_uuid and current-snapshot-id continuity across a replace are asserted. Snapshot-history preservation holds by construction (update_table never drops the table) but is not exercised by tests, since the catalog layer exposes no write path to create a snapshot first.
Open questions for maintainers
- Is
update_table + AssertTableUuid the preferred mechanism (vs stage-create + commit-transaction)?
RemoveSchemasUpdate is omitted (the fixture rejects removing snapshot-referenced schemas) — acceptable, or should superseded schemas be pruned?
- Property semantics: stale user props removed, catalog-managed keys kept — matches expectations?
Problem
The Iceberg REST catalog returns
NotSupportedforCREATE OR REPLACE/REPLACE TABLE.Proposal
Atomic replace via
update_table+AssertTableUuid— load the existing table, stage schema/spec/sort/property updates, and commit in one server-side transaction. No drop, so the table UUID, location and snapshot history are preserved by construction. Stale user properties are removed; catalog-managed keys are kept.table_uuidandcurrent-snapshot-idcontinuity across a replace are asserted. Snapshot-history preservation holds by construction (update_tablenever drops the table) but is not exercised by tests, since the catalog layer exposes no write path to create a snapshot first.Open questions for maintainers
update_table+AssertTableUuidthe preferred mechanism (vs stage-create + commit-transaction)?RemoveSchemasUpdateis omitted (the fixture rejects removing snapshot-referenced schemas) — acceptable, or should superseded schemas be pruned?