smaheshwar-pltr commented on code in PR #2146: URL: https://github.com/apache/iceberg-python/pull/2146#discussion_r2164381960
########## pyiceberg/table/statistics.py: ########## @@ -29,15 +29,24 @@ class BlobMetadata(IcebergBaseModel): properties: Optional[Dict[str, str]] = None -class StatisticsFile(IcebergBaseModel): +class StatisticsCommonFields(IcebergBaseModel): + """Common fields between table and partition statistics structs found on metadata.""" + snapshot_id: int = Field(alias="snapshot-id") statistics_path: str = Field(alias="statistics-path") file_size_in_bytes: int = Field(alias="file-size-in-bytes") + + +class StatisticsFile(StatisticsCommonFields): Review Comment: In https://github.com/apache/iceberg-python/pull/2033/files I did `class StatisticsFile(StatisticsCommonFields, IcebergBaseModel):` (subclassing both) for consistency with table metadata where we have e.g. https://github.com/apache/iceberg-python/blob/6b19f0c6b68c07d4eaac149d224ba4abce22200d/pyiceberg/table/metadata.py#L469 Despite https://github.com/apache/iceberg-python/blob/6b19f0c6b68c07d4eaac149d224ba4abce22200d/pyiceberg/table/metadata.py#L127 -- 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