Skip to content

Proposal: CREATE OR REPLACE TABLE for the Iceberg REST catalog #2165

Description

@ErikBPF

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

  1. Is update_table + AssertTableUuid the preferred mechanism (vs stage-create + commit-transaction)?
  2. RemoveSchemasUpdate is omitted (the fixture rejects removing snapshot-referenced schemas) — acceptable, or should superseded schemas be pruned?
  3. Property semantics: stale user props removed, catalog-managed keys kept — matches expectations?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions