Fokko commented on code in PR #2359:
URL: https://github.com/apache/iceberg-python/pull/2359#discussion_r2288219772


##########
pyiceberg/table/inspect.py:
##########
@@ -330,17 +330,42 @@ def update_partitions_map(
             else:
                 raise ValueError(f"Unknown DataFileContent ({file.content})")
 
-        partitions_map: Dict[Tuple[str, Any], Any] = {}
-        snapshot = self._get_snapshot(snapshot_id)
-        for manifest in snapshot.manifests(self.tbl.io):
+        def process_manifest(manifest: ManifestFile) -> Dict[Tuple[str, Any], 
Any]:

Review Comment:
   Since we're at it, I would suggest two things:
   
   - Move the inline function to the class level, and add an underscore to the 
name, to indicate that it is considered private `_process_manifest`.
   - Merge this function with `update_partitions_map`, since that function 
isn't used anywhere else.



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

Reply via email to