ebyhr commented on code in PR #3499:
URL: https://github.com/apache/iceberg-python/pull/3499#discussion_r3408757522


##########
pyiceberg/catalog/rest/__init__.py:
##########
@@ -545,6 +551,32 @@ def _fetch_scan_tasks(self, identifier: str | Identifier, 
plan_task: str) -> Sca
 
         return ScanTasks.model_validate_json(response.text)
 
+    @retry(**_RETRY_ARGS)

Review Comment:
   nit: These methods are added between `_fetch_scan_tasks` and `plan_scan`. 
These two methods are closely related. How about relocating these new methods 
to different locations? 



##########
pyiceberg/catalog/rest/__init__.py:
##########
@@ -545,6 +551,32 @@ def _fetch_scan_tasks(self, identifier: str | Identifier, 
plan_task: str) -> Sca
 
         return ScanTasks.model_validate_json(response.text)
 
+    @retry(**_RETRY_ARGS)
+    def _load_credentials(
+        self,
+        identifier: str | Identifier,
+    ) -> LoadCredentialsResponse:
+        """Load raw vended storage credentials for a table."""
+        self._check_endpoint(Capability.V1_LOAD_CREDENTIALS)
+        response = self._session.get(
+            self.url(Endpoints.load_credentials, prefixed=True, 
**self._split_identifier_for_path(identifier)),

Review Comment:
   Assuming we'll support optional parameters as a follow-up if necessary: 
   ```yml
         parameters:
           - name: planId
             in: query
             required: false
             schema:
               type: string
             description: The plan ID that has been used for server-side scan 
planning
           - $ref: '#/components/parameters/referenced-by'
   ```
   
https://github.com/apache/iceberg/blob/51ee2cc0d993fe58de21b76613f350da97e9d3ef/open-api/rest-catalog-open-api.yaml#L1363-L1370



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