kevinjqliu commented on code in PR #956:
URL: https://github.com/apache/iceberg-python/pull/956#discussion_r1688471128
##########
pyiceberg/table/__init__.py:
##########
@@ -1178,10 +1178,15 @@ def update_table_metadata(
"""
context = _TableMetadataUpdateContext()
new_metadata = base_metadata
+ new_metadata = new_metadata.model_copy(update={"last_updated_ms": 0})
for update in updates:
new_metadata = _apply_table_update(update, new_metadata, context)
Review Comment:
I like your approach @HonahX
> we only add_update to the context when we actually change the metadata.
I didn't know about this, cool
> We could add has_changes() that checks if the size of underlying _updates
is greater than 0 to
+1
Is it necessary to check for `base_metadata.last_updated_ms ==
new_metadata.last_updated_ms`?
--
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]