bharos commented on code in PR #2941:
URL: https://github.com/apache/iceberg-python/pull/2941#discussion_r2717987852
##########
pyiceberg/catalog/hive.py:
##########
@@ -551,23 +551,30 @@ def commit_table(
if hive_table and current_table:
# Table exists, update it.
- new_parameters = _construct_parameters(
+
+ # Note on table properties:
+ # - Iceberg table properties are stored in both HMS and
Iceberg metadata JSON.
+ # - Updates are reflected in both locations
+ # - Existing HMS table properties (set by external systems
like Hive/Spark) are preserved.
+ #
+ # While it is possible to modify HMS table properties
through this API, it is not recommended:
+ # - New/Updated HMS table properties will also be stored
in Iceberg metadata (even though it's HMS-specific)
+ # - HMS properties cannot be deleted since they are not
visible to Iceberg
Review Comment:
Can we be more explicit here like
HMS-native properties (set outside Iceberg) cannot be deleted since they are
not visible to Iceberg
because in cases like below, it can actually delete HMS properties?
```
# Set via Iceberg
table.updateProperties().set("hive.table_prop", "true").commit()
# → Goes to BOTH Iceberg metadata AND HMS
# → Now it's "visible" to Iceberg (tracked in Iceberg metadata)
# Unset via Iceberg
table.updateProperties().remove("hive.table_prop").commit()
# → deleted_iceberg_properties = {"hive.table_prop"}
# → Removed from BOTH Iceberg metadata AND HMS ✅
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]