RussellSpitzer commented on code in PR #193:
URL: https://github.com/apache/polaris/pull/193#discussion_r1730624831


##########
polaris-service/src/main/java/io/polaris/service/catalog/BasePolarisCatalog.java:
##########
@@ -897,10 +918,11 @@ private void validateLocationForTableLike(
           // }
         },
         () -> {
-          if (location.startsWith("file:") || location.startsWith("http")) {
+          if (locations.stream()
+              .anyMatch(location -> location.startsWith("file:") || 
location.startsWith("http"))) {
             throw new ForbiddenException(
-                "Invalid location '%s' for identifier '%s': File locations are 
not allowed",
-                location, identifier);
+                "Invalid locations '%s' for identifier '%s': File locations 
are not allowed",

Review Comment:
   This is going to be a little confusing because we are reporting that all 
locations are invalid when we are only sure that at least 1 is. We should 
probably do a filter so we can report only those that are violating the 
perquisites. 



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