You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/12/03 00:30:35 UTC

[GitHub] [iceberg] rdblue commented on a change in pull request #3656: AWS: remove S3URI scheme restrictions

rdblue commented on a change in pull request #3656:
URL: https://github.com/apache/iceberg/pull/3656#discussion_r761565848



##########
File path: aws/src/main/java/org/apache/iceberg/aws/s3/S3URI.java
##########
@@ -58,14 +54,14 @@
 
     this.location = location;
     String [] schemeSplit = location.split(SCHEME_DELIM, -1);
-    ValidationException.check(schemeSplit.length == 2, "Invalid S3 URI: %s", location);
-
-    String scheme = schemeSplit[0];
-    ValidationException.check(VALID_SCHEMES.contains(scheme.toLowerCase()), "Invalid scheme: %s", scheme);
+    ValidationException.check(schemeSplit.length == 2,
+        "Cannot determine S3 URI scheme: %s", location);
 
     String [] authoritySplit = schemeSplit[1].split(PATH_DELIM, 2);
-    ValidationException.check(authoritySplit.length == 2, "Invalid S3 URI: %s", location);
-    ValidationException.check(!authoritySplit[1].trim().isEmpty(), "Invalid S3 key: %s", location);
+    ValidationException.check(authoritySplit.length == 2,
+        "Cannot determine bucket in S3 URI path: %s", location);

Review comment:
       The bucket isn't in the URI path element, it is in the authority. Maybe just "Cannot determine bucket in S3 URI" instead?




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org