deniskuzZ commented on code in PR #6789:
URL: https://github.com/apache/hive/pull/6789#discussion_r4422608954
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java:
##########
@@ -279,8 +279,23 @@ public HiveAuthorizationProvider
getAuthorizationProvider() {
@Override
public void configureInputJobCredentials(TableDesc tableDesc, Map<String,
String> secrets) {
- RestCatalogScanPlanningUtil.propagateCatalogSecretsToJob(tableDesc,
secrets, conf);
- IcebergVendedCredentialUtil.propagateVendedCredentialsToJob(tableDesc,
secrets, conf);
+ Properties props = tableDesc.getProperties();
+ if (props == null) {
+ return;
+ }
+ if (!IcebergVendedCredentialUtil.requestsVendedCredentials(props, conf) &&
+ !RestCatalogScanPlanningUtil.isServerSideScanPlanningEnabled(conf)) {
+ return;
+ }
+ Table table;
+ try {
+ table = IcebergVendedCredentialUtil.getTableWithVendedCredentials(props,
conf);
+ } catch (NoSuchTableException e) {
+ // Table may not exist yet for CTAS; there is nothing to plan or vend
credentials for.
+ return;
+ }
+ RestCatalogScanPlanningUtil.propagateCatalogSecretsToJob(table, tableDesc,
secrets, conf);
Review Comment:
thank you!
--
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]