HonahX commented on code in PR #8622: URL: https://github.com/apache/iceberg/pull/8622#discussion_r1341091318
########## 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: Thanks for the suggestion! I made two constants `DATA_FILE_TYPE_V1` and `DATA_FILE_TYPE_V2`. I think in this way we can also simplify the `data_file_with_partition` a llitle bit. -- 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