samredai commented on code in PR #4717:
URL: https://github.com/apache/iceberg/pull/4717#discussion_r894764046
##########
python/src/iceberg/table/partitioning.py:
##########
@@ -29,38 +36,81 @@ class PartitionField:
name(str): The name of this partition field
"""
- def __init__(self, source_id: int, field_id: int, transform: Transform,
name: str):
- self._source_id = source_id
- self._field_id = field_id
- self._transform = transform
- self._name = name
+ source_id: int
+ field_id: int
+ transform: Transform
+ name: str
+
+ def __str__(self):
+ return f"{self.field_id}: {self.name}:
{self.transform}({self.source_id})"
+
- @property
- def source_id(self) -> int:
- return self._source_id
+@dataclass(eq=False, frozen=True)
+class PartitionSpec:
+ """
+ PartitionSpec capture the transformation from table data to partition
values
Review Comment:
nit: `s/capture/captures`
--
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]