Fokko commented on code in PR #8622: URL: https://github.com/apache/iceberg/pull/8622#discussion_r1339785012
########## python/pyiceberg/manifest.py: ########## @@ -208,8 +305,11 @@ def __setattr__(self, name: str, value: Any) -> None: value = FileFormat[value] super().__setattr__(name, value) - def __init__(self, *data: Any, **named_data: Any) -> None: - super().__init__(*data, **{"struct": DATA_FILE_TYPE, **named_data}) + def __init__(self, format_version: Literal[1, 2] = 1, *data: Any, **named_data: Any) -> None: + super().__init__( + *data, + **{"struct": DATA_FILE_TYPE if format_version == 1 else data_file_with_partition(StructType(), 2), **named_data}, Review Comment: Can you move the creation of the `data_file_with_partition(StructType(), 2)` to a constant as well? I liked how you had the `DATA_FILE_TYPE_V1` and `DATA_FILE_TYPE_V2` -- 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