Fokko commented on code in PR #182:
URL: https://github.com/apache/iceberg-python/pull/182#discussion_r1415525877
##########
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:
I think we're okay to skip the validation on the Pydantic side, we should
validate the input anyway to generate a more meaningful error.
We could set it to deep-copy using the `deep=True` kwarg. Doing this in
Pydantic is probably an order of magnitude more efficient than doing this in
Python.
--
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]