@@ -752,12 +752,13 @@ def _convert_entry(entry: Any) -> ManifestEntry:
752752 ]
753753
754754
755- @cached (cache = LRUCache (maxsize = 128 ), key = lambda io , manifest_list , table : hashkey (manifest_list ))
755+ @cached (cache = LRUCache (maxsize = 128 ), key = lambda io , manifest_list : hashkey (manifest_list ))
756756def _manifests (io : FileIO , manifest_list : str ) -> Tuple [ManifestFile , ...]:
757757 """Read and cache manifests from the given manifest list, returning a tuple to prevent modification."""
758758 bs = io .new_input (manifest_list ).open ().read ()
759759 from pyiceberg_core import manifest
760760
761+ entries = list (manifest .read_manifest_list (bs ).entries ())
761762 return tuple (
762763 ManifestFile (
763764 manifest .manifest_path ,
@@ -773,10 +774,18 @@ def _manifests(io: FileIO, manifest_list: str) -> Tuple[ManifestFile, ...]:
773774 manifest .added_rows_count ,
774775 manifest .existing_rows_count ,
775776 manifest .deleted_rows_count ,
776- manifest .partitions ,
777+ [
778+ PartitionFieldSummary (
779+ partition .contains_null ,
780+ partition .contains_nan ,
781+ partition .lower_bound ,
782+ partition .upper_bound ,
783+ )
784+ for partition in manifest .partitions
785+ ],
777786 manifest .key_metadata ,
778787 )
779- for manifest in manifest . read_manifest_list ( bs ). entries ()
788+ for manifest in entries
780789 )
781790
782791
@@ -823,12 +832,12 @@ def _inherit_from_manifest(entry: ManifestEntry, manifest: ManifestFile) -> Mani
823832
824833 # in v1 tables, the sequence number is not persisted and can be safely defaulted to 0
825834 # in v2 tables, the sequence number should be inherited iff the entry status is ADDED
826- if entry .sequence_number is None and ( manifest . sequence_number == 0 or entry . status == ManifestEntryStatus . ADDED ) :
835+ if entry .sequence_number is None :
827836 entry .sequence_number = manifest .sequence_number
828837
829838 # in v1 tables, the file sequence number is not persisted and can be safely defaulted to 0
830839 # in v2 tables, the file sequence number should be inherited iff the entry status is ADDED
831- if entry .file_sequence_number is None and ( manifest . sequence_number == 0 or entry . status == ManifestEntryStatus . ADDED ) :
840+ if entry .file_sequence_number is None :
832841 # Only available in V2, always 0 in V1
833842 entry .file_sequence_number = manifest .sequence_number
834843
0 commit comments