You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "geruh (via GitHub)" <gi...@apache.org> on 2025/12/19 03:42:37 UTC

[PR] feat: Add RESTscan Planning Endpoints and config [iceberg-python]

geruh opened a new pull request, #2842:
URL: https://github.com/apache/iceberg-python/pull/2842

   related to #2775 
   
   # Rationale for this change
   This PR adds some of the rest scanning endpoints needed for the synchronous scan planning And the configuration property used to determine scan planning support. 
   
   Aligning with the java implementation in https://github.com/apache/iceberg/pull/13400.
   
   ## Usage
   
   ```
   catalog = RestCatalog(
    "the-best-rest-catalog", uri="127.0.0.1:8181", **{"rest.scan-planning.enabled": "true"},
   )
   ```
   Ideally we only would want to use rest scan planning if the catalog is **_capable_**.
   
   ## Are these changes tested?
   
   ## Are there any user-facing changes?
   
   new property to configure scanning 


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat: Add RESTscan Planning Endpoints and config [iceberg-python]

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on PR #2842:
URL: https://github.com/apache/iceberg-python/pull/2842#issuecomment-3675916690

   Created an issue for reading /v1/config's endpoint https://github.com/apache/iceberg-python/issues/2847


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat: Add RESTscan Planning Endpoints and config [iceberg-python]

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on code in PR #2842:
URL: https://github.com/apache/iceberg-python/pull/2842#discussion_r2635697097


##########
pyiceberg/catalog/rest/__init__.py:
##########
@@ -130,6 +132,7 @@ class IdentifierKind(Enum):
 SNAPSHOT_LOADING_MODE = "snapshot-loading-mode"
 AUTH = "auth"
 CUSTOM = "custom"
+REST_SCAN_PLANNING_ENABLED = "rest-scan-planning-enabled"

Review Comment:
   i dug into the use of `rest-scan-planning-enabled`, its actually not a catalog server config. 
   RESTSessionCatalog is the catalog client, and `rest-scan-planning-enabled` is used along with the checking whether the specific scan planning endpoint is advertised by the server. 
   
   https://github.com/apache/iceberg/blob/05998edb8808ae21739072cca17b621925a2081a/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java#L275-L279
   https://github.com/apache/iceberg/blob/05998edb8808ae21739072cca17b621925a2081a/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java#L510



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat: Add RESTscan Planning Endpoints and config [iceberg-python]

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu merged PR #2842:
URL: https://github.com/apache/iceberg-python/pull/2842


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat: Add RESTscan Planning Endpoints and config [iceberg-python]

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on code in PR #2842:
URL: https://github.com/apache/iceberg-python/pull/2842#discussion_r2635779350


##########
pyiceberg/catalog/rest/__init__.py:
##########
@@ -269,6 +272,14 @@ def _create_session(self) -> Session:
 
         return session
 
+    def is_scan_planning_enabled(self) -> bool:
+        """Check if server-side scan planning is enabled.
+
+        Returns:
+            True if enabled, False otherwise.
+        """
+        return property_as_bool(self.properties, REST_SCAN_PLANNING_ENABLED, False)

Review Comment:
   ```suggestion
       def is_rest_scan_planning_enabled(self) -> bool:
           """Check if server-side scan planning is enabled.
   
           Returns:
               True if enabled, False otherwise.
           """
           return property_as_bool(self.properties, REST_SCAN_PLANNING_ENABLED, REST_SCAN_PLANNING_ENABLED_DEFAULT)
   ```
   nit: let's use "rest scan planning", maybe add `REST_SCAN_PLANNING_ENABLED_DEFAULT` 



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat: Add RESTscan Planning Endpoints and config [iceberg-python]

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on code in PR #2842:
URL: https://github.com/apache/iceberg-python/pull/2842#discussion_r2633563713


##########
pyiceberg/catalog/rest/__init__.py:
##########
@@ -130,6 +132,7 @@ class IdentifierKind(Enum):
 SNAPSHOT_LOADING_MODE = "snapshot-loading-mode"
 AUTH = "auth"
 CUSTOM = "custom"
+REST_SCAN_PLANNING_ENABLED = "rest-scan-planning-enabled"

Review Comment:
   looks like `rest-scan-planning-enabled` is a catalog server config
   https://github.com/apache/iceberg/blob/05998edb8808ae21739072cca17b621925a2081a/core/src/main/java/org/apache/iceberg/rest/RESTCatalogProperties.java#L40-L41



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat: Add RESTscan Planning Endpoints and config [iceberg-python]

Posted by "geruh (via GitHub)" <gi...@apache.org>.
geruh commented on PR #2842:
URL: https://github.com/apache/iceberg-python/pull/2842#issuecomment-3673645795

   > Looks like `rest-scan-planning-enabled` is a server-side config. Should we check `/v1/config` response to see if the endpoints are supported by the catalog?
   
   Yes, I rememebr there was an open PR for the endpoints capability but haven't been able to find it. I'll probably raise a PR to add the endpoints logic.


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org