smaheshwar-pltr commented on code in PR #2146:
URL: https://github.com/apache/iceberg-python/pull/2146#discussion_r2164380649
##########
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:
Nit: 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
--
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]