rdblue commented on code in PR #5672:
URL: https://github.com/apache/iceberg/pull/5672#discussion_r962040196


##########
python/pyiceberg/table/sorting.py:
##########
@@ -112,20 +115,18 @@ class SortOrder(IcebergBaseModel):
     The order of the sort fields within the list defines the order in which 
the sort is applied to the data.
 
     Args:
-      order_id (int): The id of the sort-order. To keep track of historical 
sorting
+      order_id (int): An unique id of the sort-order of a table.
       fields (List[SortField]): The fields how the table is sorted
     """
 
-    def __init__(self, order_id: Optional[int] = None, *fields: SortField, 
**data: Any):
-        if order_id is not None:
-            data["order-id"] = order_id
+    order_id: int = Field(alias="order-id", default=INITIAL_SORT_ORDER_ID)

Review Comment:
   Here as well, I think forcing the caller to handle sort order ID is a good 
idea.



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