@@ -558,9 +558,11 @@ def commit_table(
558558 # - Existing HMS table properties (set by external systems like Hive/Spark) are preserved.
559559 #
560560 # While it is possible to modify HMS table properties through this API, it is not recommended:
561- # - New/Updated HMS table properties will also be stored in Iceberg metadata (even though it is HMS-specific)
562- # - HMS properties cannot be deleted since they are not visible to Iceberg
563561 # - Mixing HMS-specific properties in Iceberg metadata can cause confusion
562+ # - New/updated HMS table properties will also be stored in Iceberg metadata (even though it is HMS-specific)
563+ # - HMS-native properties (set outside Iceberg) cannot be deleted since they are not visible to Iceberg
564+ # (However, if you first SET an HMS property via Iceberg, it becomes tracked in Iceberg metadata,
565+ # and can then be deleted via Iceberg - which removes it from both Iceberg metadata and HMS)
564566 new_iceberg_properties = _construct_parameters (
565567 metadata_location = updated_staged_table .metadata_location ,
566568 previous_metadata_location = current_table .metadata_location ,
@@ -569,7 +571,7 @@ def commit_table(
569571 # Detect properties that were removed from Iceberg metadata
570572 deleted_iceberg_properties = current_table .properties .keys () - updated_staged_table .properties .keys ()
571573
572- # Merge: preserve HMS-only properties, remove deleted Iceberg properties, apply new Iceberg properties
574+ # Merge: preserve HMS-native properties, remove deleted Iceberg properties, apply new Iceberg properties
573575 existing_hms_parameters = dict (hive_table .parameters or {})
574576 for key in deleted_iceberg_properties :
575577 existing_hms_parameters .pop (key , None )
0 commit comments