aammar5 commented on code in PR #1958:
URL: https://github.com/apache/iceberg-python/pull/1958#discussion_r2279414035
##########
pyiceberg/table/inspect.py:
##########
@@ -681,6 +692,35 @@ def all_manifests(self) -> "pa.Table":
)
return pa.concat_tables(manifests_by_snapshots)
+ def _all_known_files(self) -> dict[str, set[str]]:
+ """Get all the known files in the table.
+
+ Returns:
+ dict of {file_type: set of file paths} for each file type.
+ """
+ snapshots = self.tbl.snapshots()
+
+ _all_known_files = {}
+ _all_known_files["manifests"] =
set(self.all_manifests(snapshots)["path"].to_pylist())
Review Comment:
What's the reason we can't do this? I saw `self._get_snapshot` being used in
a few other places
```suggestion
_all_known_files["manifests"] = set([manifest[0] for snapshot in
snapshots for manifest in
self._get_snapshot(snapshot.snapshot_id).manifests(self.tbl.io)])
```
--
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]