Skip to content

Conversation

@geruh
Copy link
Contributor

@geruh geruh commented Dec 25, 2025

related to #2775

Rationale for this change

Adds synchornous client-side support for REST server side scan planning, allowing for scanning if the rest catalog supports it.

This PR cherry-picks and builds on two WIP PRs:

Currently scanning is enable with rest-scan-planning-enabled=true in catalog properties.

TODO: spec handling

Are these changes tested?

Integration tests added with manual testing

Are there any user-facing changes?

yes

@geruh geruh changed the title Scan wip feat: Add support for rest scan planning Dec 25, 2025
@geruh geruh marked this pull request as ready for review January 1, 2026 22:41
Comment on lines 2054 to 2060
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()
Copy link
Contributor

@Fokko Fokko Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments, would be good to get those cleaned up. Apart from that, this looks great to me! Thanks @geruh for working on this, very exciting to see this being added 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants