gabeiglio commented on code in PR #2410:
URL: https://github.com/apache/iceberg-python/pull/2410#discussion_r2731878169


##########
pyiceberg/table/update/__init__.py:
##########
@@ -706,6 +706,12 @@ def update_table_metadata(
         if base_metadata.last_updated_ms == new_metadata.last_updated_ms:
             new_metadata = new_metadata.model_copy(update={"last_updated_ms": 
datetime_to_millis(datetime.now().astimezone())})
 
+    # Check correctness of partition spec, and sort order
+    new_metadata.spec().check_compatible(new_metadata.schema())
+
+    if sort_order := 
new_metadata.sort_order_by_id(new_metadata.default_sort_order_id):

Review Comment:
   This makes sense, and its an easy change, will add 



-- 
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