dramaticlly commented on code in PR #4717: URL: https://github.com/apache/iceberg/pull/4717#discussion_r872689598
########## python/src/iceberg/table/partitioning.py: ########## @@ -14,8 +14,13 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. +from typing import Dict, Iterable, List, Tuple + +from iceberg.schema import Schema from iceberg.transforms import Transform +_PARTITION_DATA_ID_START: int = 1000 + class PartitionField: Review Comment: yeah I agree the PartitionField is an immutable class after construction so dataclass with both eq and frozen sounds fair to me. On the other side, I think the biggest benefit of the dataclass is the `__post_init__` method which allow for java-like builderPattern equivalent processing when we build the PartitionSpec. There's collection of validations need to happen and I am discussing with @samredai in https://github.com/apache/iceberg/issues/4631#issuecomment-1113632408. From what I can tell, we will need a `PartitionSpecBuilder` class with convenient way to construct the PartitionSpec, but we also want to make sure avoid duplicate the builder logic in an overly complex init method for PartitionSpec -- 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]
