eric-maynard commented on code in PR #165:
URL: https://github.com/apache/polaris/pull/165#discussion_r1731565049
##########
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:
Agreed, I think this can maybe wait until we have more prefixes in the
future though. There are a lot of places in the code that will have to change.
--
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]