rdblue commented on code in PR #6506: URL: https://github.com/apache/iceberg/pull/6506#discussion_r1060146658
########## python/pyiceberg/manifest.py: ########## @@ -104,29 +104,100 @@ class ManifestEntry(IcebergBaseModel): data_file: DataFile = Field() +PARTITION_FIELD_SUMMARY_TYPE = StructType( + NestedField(509, "contains_null", BooleanType(), required=True), + NestedField(518, "contains_nan", BooleanType(), required=False), + NestedField(510, "lower_bound", BinaryType(), required=False), + NestedField(511, "upper_bound", BinaryType(), required=False) +) + + class PartitionFieldSummary(IcebergBaseModel): contains_null: bool = Field() contains_nan: Optional[bool] = Field() lower_bound: Optional[bytes] = Field() upper_bound: Optional[bytes] = Field() -class ManifestFile(IcebergBaseModel): - manifest_path: str = Field() - manifest_length: int = Field() - partition_spec_id: int = Field() - content: ManifestContent = Field(default=ManifestContent.DATA) - sequence_number: int = Field(default=0) - min_sequence_number: int = Field(default=0) - added_snapshot_id: Optional[int] = Field() - added_data_files_count: Optional[int] = Field() - existing_data_files_count: Optional[int] = Field() - deleted_data_files_count: Optional[int] = Field() - added_rows_count: Optional[int] = Field() - existing_rows_counts: Optional[int] = Field() - deleted_rows_count: Optional[int] = Field() - partitions: Optional[List[PartitionFieldSummary]] = Field() - key_metadata: Optional[bytes] = Field() +MANIFEST_FILE_SCHEMA: Schema = Schema( + NestedField(500, "manifest_path", StringType(), required=True, doc="Location URI with FS scheme"), + NestedField(501, "manifest_length", LongType(), required=True), + NestedField(502, "partition_spec_id", IntegerType(), required=True), + NestedField(517, "content", IntegerType(), required=False), + NestedField(515, "sequence_number", LongType(), required=False), + NestedField(516, "min_sequence_number", LongType(), required=False), + NestedField(503, "added_snapshot_id", LongType(), required=False), + NestedField(504, "added_data_files_count", IntegerType(), required=False), Review Comment: These should be `added_files_count` etc. -- 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