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


##########
pyiceberg/table/metadata.py:
##########
@@ -121,7 +122,7 @@ def check_sort_orders(table_metadata: TableMetadata) -> 
TableMetadata:
 
 def construct_refs(table_metadata: TableMetadata) -> TableMetadata:
     """Set the main branch if missing."""
-    if table_metadata.current_snapshot_id is not None:
+    if table_metadata.current_snapshot_id is not None and 
table_metadata.current_snapshot_id != -1:

Review Comment:
   Is this -1 check still necessary? `construct_refs` is an after validator. At 
this point, `cleanup_snapshot_id` should already turn `current_snapshot_id=-1` 
to `None`.



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