dimas-b commented on code in PR #10329: URL: https://github.com/apache/iceberg/pull/10329#discussion_r1599215769
########## core/src/test/java/org/apache/iceberg/TestLocationProvider.java: ########## @@ -285,4 +286,22 @@ public void testObjectStorageWithinTableLocation() { assertThat(parts).element(2).asString().isNotEmpty(); assertThat(parts).element(3).asString().isEqualTo("test.parquet"); } + + @TestTemplate + public void testEncodedFieldNameInPartitionPath() { + // Update the table to use a string field for partitioning with special characters in the name + table.updateProperties().set(TableProperties.OBJECT_STORE_ENABLED, "true").commit(); + table.updateSchema().addColumn("data#1", Types.StringType.get()).commit(); + table.updateSpec().addField("data#1").commit(); Review Comment: Example: ``` @Test void testA() { URI uri = URI.create("s3://bucket/path/id%22=1/something.parquet"); S3Utilities u = S3Utilities.builder().region(Region.EU_CENTRAL_1).build(); S3Uri s3Uri = u.parseUri(uri); soft.assertThat(s3Uri.key().get()).isEqualTo("path/id%22=1/something.parquet"); } ``` Outcome: ``` Expected :"path/id%22=1/something.parquet" Actual :"path/id"=1/something.parquet" ``` Note that Iceberg, by virtue of having its own `S3URI` class, will use `path/id%22=1/something.parquet` (with the `%` sign) as the S3 key at the S3 API level. -- 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-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org