Skip to content

Proposal: REPLACE TABLE for the Hive Metastore catalog #2166

Description

@ErikBPF

Problem

The Hive Metastore catalog returns NotSupported for CREATE OR REPLACE / REPLACE TABLE.

Proposal

alter_table (single Thrift call) under an exclusive table lock — no drop+create data-loss window. Partition keys are carried forward (a requested change errors); a metadata_location precondition is re-checked under the lock for lakehouse tables.

Open questions for maintainers

  1. Is alter_table-under-lock acceptable given HMS has no CAS primitive? The residual race for plain (non-lakehouse) tables is documented — tolerable?
  2. Erroring on a requested partition change (vs silently keeping the old spec) — correct behavior?

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