HonahX commented on code in PR #182:
URL: https://github.com/apache/iceberg-python/pull/182#discussion_r1416622061


##########
pyiceberg/table/__init__.py:
##########
@@ -533,6 +535,8 @@ def update_table_metadata(base_metadata: TableMetadata, 
updates: Tuple[TableUpda
     for update in updates:
         new_metadata = _apply_table_update(update, new_metadata, context)
 
+    # Rebuild metadata to trigger validation
+    new_metadata = TableMetadataUtil.parse_obj(copy(new_metadata.model_dump()))

Review Comment:
   Thanks for the explanation! I changed to `model_copy(deep=True)` here and 
moved the validation to a unit test



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to