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: [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]

Reply via email to