findinpath commented on code in PR #18304:
URL: https://github.com/apache/iceberg/pull/18304#discussion_r4151764631


##########
core/src/test/java/org/apache/iceberg/TestLocationProvider.java:
##########
@@ -263,6 +263,26 @@ public void testObjectStorageWithinTableLocation() {
     assertThat(parts).element(6).asString().isEqualTo("test.parquet");
   }
 
+  @TestTemplate
+  public void testObjectStoragePathContext() {
+    assertPathContext("s3://bucket/db/table", "db/table");
+    assertPathContext("s3://bucket/db/table/", "db/table");
+    assertPathContext("s3://bucket/ns/db/table", "db/table");
+    assertPathContext("s3://bucket/table", "/table");

Review Comment:
   While this is actually the functionality that existed with `Path` , I'm not 
sure whether it makes sense to have it. 
   
   We may end up unintentionally building double-slashed paths this way:
   
   
https://github.com/apache/iceberg/blob/f12ec1b5c6f1c88a941b0ebd3a9064fb45264efa/core/src/main/java/org/apache/iceberg/LocationProviders.java#L188



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

Reply via email to