eric-maynard commented on code in PR #370:
URL: https://github.com/apache/polaris/pull/370#discussion_r1800009320


##########
polaris-core/src/main/java/org/apache/polaris/core/entity/CatalogEntity.java:
##########
@@ -249,12 +249,19 @@ public Builder setStorageConfigurationInfo(
             break;
           case AZURE:
             AzureStorageConfigInfo azureConfigModel = (AzureStorageConfigInfo) 
storageConfigModel;
-            config =
+            AzureStorageConfigurationInfo azureconfigInfo =
                 new AzureStorageConfigurationInfo(
                     new ArrayList<>(allowedLocations), 
azureConfigModel.getTenantId());
+            
azureconfigInfo.setMultiTenantAppName(azureConfigModel.getMultiTenantAppName());

Review Comment:
   This makes sense, good fine. For AWS, we do it like this with casting:
   
   ```
                   new AwsStorageConfigurationInfo(
                       PolarisStorageConfigurationInfo.StorageType.S3,
                       new ArrayList<>(allowedLocations),
                       awsConfigModel.getRoleArn(),
                       awsConfigModel.getExternalId());
               ((AwsStorageConfigurationInfo) 
config).validateArn(awsConfigModel.getRoleArn());
   ```
   
   Can you maybe also refactor the AWS bit to match this? Or use casting here, 
either way seems okay to me.



##########
polaris-core/src/main/java/org/apache/polaris/core/entity/CatalogEntity.java:
##########
@@ -249,12 +249,19 @@ public Builder setStorageConfigurationInfo(
             break;
           case AZURE:
             AzureStorageConfigInfo azureConfigModel = (AzureStorageConfigInfo) 
storageConfigModel;
-            config =
+            AzureStorageConfigurationInfo azureconfigInfo =
                 new AzureStorageConfigurationInfo(
                     new ArrayList<>(allowedLocations), 
azureConfigModel.getTenantId());
+            
azureconfigInfo.setMultiTenantAppName(azureConfigModel.getMultiTenantAppName());

Review Comment:
   This makes sense, good find. For AWS, we do it like this with casting:
   
   ```
                   new AwsStorageConfigurationInfo(
                       PolarisStorageConfigurationInfo.StorageType.S3,
                       new ArrayList<>(allowedLocations),
                       awsConfigModel.getRoleArn(),
                       awsConfigModel.getExternalId());
               ((AwsStorageConfigurationInfo) 
config).validateArn(awsConfigModel.getRoleArn());
   ```
   
   Can you maybe also refactor the AWS bit to match this? Or use casting here, 
either way seems okay to me.



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

Reply via email to