Fokko commented on code in PR #5124:
URL: https://github.com/apache/iceberg/pull/5124#discussion_r918318438
##########
python/pyiceberg/table/metadata.py:
##########
@@ -159,10 +163,14 @@ def construct_refs(cls, data: Dict[str, Any]):
remove oldest metadata log entries and keep a fixed-size log of the most
recent entries after a commit."""
- sort_orders: List[Dict[str, Any]] = Field(alias="sort-orders",
default_factory=list)
+ sort_orders: List[SortOrder] = Field(alias="sort-orders",
default_factory=list)
"""A list of sort orders, stored as full sort order objects."""
- default_sort_order_id: int = Field(alias="default-sort-order-id",
default=DEFAULT_SORT_ORDER_UNSORTED)
+ @property
+ def bound_sort_orders(self) -> List[SortOrder]:
+ return [sort_order.bind(self.current_schema()) for sort_order in
self.sort_orders]
Review Comment:
With the new changes, we can revert all of this. I agree that it is kinda
awkward. Let me know what you think.
--
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]