sunxiaojian commented on code in PR #8592:
URL: https://github.com/apache/gravitino/pull/8592#discussion_r2366198315
##########
iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/CatalogWrapperForREST.java:
##########
@@ -99,6 +102,30 @@ public LoadTableResponse loadTable(TableIdentifier
identifier, boolean requestCr
return loadTableResponse;
}
+ /**
+ * Get table credentials.
+ *
+ * @param identifier The table identifier for which to load credentials
+ * @return A {@link
org.apache.iceberg.rest.responses.LoadCredentialsResponse} object containing
+ * the credentials.
+ */
+ public LoadCredentialsResponse loadTableCredentials(TableIdentifier
identifier) {
+ try {
+ LoadTableResponse loadTableResponse = super.loadTable(identifier);
+ Credential credential = getCredential(loadTableResponse);
+ // Convert Gravitino credential to Iceberg credential.
+ ImmutableCredential icebergCredential =
+ ImmutableCredential.builder()
+ .prefix(credential.credentialType())
Review Comment:
Cannot use empty, the validation will fail.
--
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]