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
- Is
alter_table-under-lock acceptable given HMS has no CAS primitive? The residual race for plain (non-lakehouse) tables is documented — tolerable?
- Erroring on a requested partition change (vs silently keeping the old spec) — correct behavior?
Problem
The Hive Metastore catalog returns
NotSupportedforCREATE 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); ametadata_locationprecondition is re-checked under the lock for lakehouse tables.Open questions for maintainers
alter_table-under-lock acceptable given HMS has no CAS primitive? The residual race for plain (non-lakehouse) tables is documented — tolerable?