collado-mike commented on code in PR #165:
URL: https://github.com/apache/polaris/pull/165#discussion_r1733630809


##########
polaris-service/src/main/java/io/polaris/service/catalog/BasePolarisCatalog.java:
##########
@@ -897,10 +898,19 @@ private void validateLocationForTableLike(
           // }
         },
         () -> {
-          if (location.startsWith("file:") || location.startsWith("http")) {
-            throw new ForbiddenException(
-                "Invalid location '%s' for identifier '%s': File locations are 
not allowed",
-                location, identifier);
+          List<String> allowedStorageTypes =
+              callContext
+                  .getPolarisCallContext()
+                  .getConfigurationStore()
+                  .getConfiguration(
+                      callContext.getPolarisCallContext(),
+                      PolarisConfiguration.SUPPORTED_CATALOG_STORAGE_TYPES);
+          if 
(!allowedStorageTypes.contains(StorageConfigInfo.StorageTypeEnum.FILE.name())) {

Review Comment:
   I wonder if we ever actually execute this code anymore. The storage 
configuration used to be optional, but I think it's always required now. The 
code treats it as optional in places, but the spec requires it for Catalog 
creation.



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