dimas-b commented on code in PR #1164:
URL: https://github.com/apache/polaris/pull/1164#discussion_r2042649037


##########
service/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogAdapter.java:
##########
@@ -398,9 +398,18 @@ public Response loadTable(
                     .loadTableIfStale(tableIdentifier, ifNoneMatch, snapshots)
                     .orElseThrow(() -> new 
WebApplicationException(Response.Status.NOT_MODIFIED));
           } else {
+            String credentialsEndpoint =
+                String.format(
+                    "/v1/%s/namespaces/%s/tables/%s/credentials",
+                    prefix, tableIdentifier.namespace().toString(), 
tableIdentifier.name());
             response =
                 catalog
-                    .loadTableWithAccessDelegationIfStale(tableIdentifier, 
ifNoneMatch, snapshots)
+                    .loadTableWithAccessDelegationIfStale(
+                        tableIdentifier,
+                        ifNoneMatch,
+                        snapshots,
+                        delegationModes,
+                        RESTUtil.decodeString(credentialsEndpoint))

Review Comment:
   I believe this class (or class above it in the call chain) should inject 
`credentialsEndpoint` in this response. We should not push this parameter down 
to `loadTableWithAccessDelegationIfStale` because the lower level class has 
nothing to do with REST URIs.



-- 
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-unsubscr...@polaris.apache.org

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

Reply via email to