Fokko commented on code in PR #2864:
URL: https://github.com/apache/iceberg-python/pull/2864#discussion_r2682179404
##########
pyiceberg/table/__init__.py:
##########
@@ -1970,12 +2051,35 @@ def scan_plan_helper(self) ->
Iterator[list[ManifestEntry]]:
],
)
- def plan_files(self) -> Iterable[FileScanTask]:
- """Plans the relevant files by filtering on the PartitionSpecs.
+ def _should_use_rest_planning(self) -> bool:
+ """Check if REST scan planning should be used for this scan."""
+ from pyiceberg.catalog.rest import RestCatalog
+
+ if not isinstance(self.catalog, RestCatalog):
+ return False
+ return self.catalog.is_rest_scan_planning_enabled()
Review Comment:
I would be inclined to create a method on the `Catalog`, eg:
```
@property
@abstractmethod
def use_server_side_planning(self, identifier: str | Identifier) -> bool:
"""Support for Server Side Planning"""
```
Have the `MetastoreCatalog` implement it, and return `False`. And rename
`is_rest_scan_planning_enabled` to `support_server_side_planning`. Now we have
to go though multiple jumps.
This would also clean up `_plan_files_rest` below.
--
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]