rdblue commented on code in PR #6933:
URL: https://github.com/apache/iceberg/pull/6933#discussion_r1117793557


##########
python/pyiceberg/table/snapshots.py:
##########
@@ -117,12 +125,369 @@ def manifests(self, io: FileIO) -> List[ManifestFile]:
             return list(read_manifest_list(file))
         return []
 
+    def added_data_files(self, io: FileIO) -> Generator[DataFile, None, None]:
+        for manifest in self.manifests(io):
+            yield from [entry.data_file for entry in 
manifest.fetch_manifest_entry(io)]
+
 
 class MetadataLogEntry(IcebergBaseModel):
     metadata_file: str = Field(alias="metadata-file")
     timestamp_ms: int = Field(alias="timestamp-ms")
 
 
 class SnapshotLogEntry(IcebergBaseModel):
-    snapshot_id: str = Field(alias="snapshot-id")
+    snapshot_id: int = Field(alias="snapshot-id")
     timestamp_ms: int = Field(alias="timestamp-ms")
+
+
+def is_ancestor_of(table: "Table", snapshot_id: int, ancestor_snapshot_id: 
int) -> bool:

Review Comment:
   Table instead of "Table" because it is imported when type checking?



-- 
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

Reply via email to