jackye1995 commented on a change in pull request #4334:
URL: https://github.com/apache/iceberg/pull/4334#discussion_r830683570
##########
File path: aws/src/test/java/org/apache/iceberg/aws/s3/TestS3URI.java
##########
@@ -90,4 +92,17 @@ public void testValidSchemes() {
assertEquals("path/to/file", uri.key());
}
}
+
+ @Test
+ public void testS3URIWithBucketToAccessPointMapping() {
+ String p1 = "s3://bucket/path/to/file?query=foo#bar";
+ Map<String, String> bucketToAccessPointMapping = ImmutableMap.of(
+ "bucket", "access-point"
+ );
+ S3URI uri1 = new S3URI(p1, bucketToAccessPointMapping);
+
+ assertEquals("access-point", uri1.bucket());
Review comment:
There could be 2 possiblities:
1. an ARN, something like
`arn:aws:s3:region:111122223333:accesspoint/my-access-point`
2. an alias, something like
`my-access-point-aqfqprnstn7aefdfbarligizwgyfouse1a-s3alias`
because of 2, the string can really be anything that satisfies the bucket
regex, so it's a bit hard to validate on service side, given the fact that we
do not really check for normal bucket name correctness either. I think it
should be fine to delegate to the S3 service to check for name correctness.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]