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 2020/07/22 16:23:28 UTC

[GitHub] [iceberg] RussellSpitzer commented on a change in pull request #1228: Fix Handling of SparkPartitions with Whitepsace in Location

RussellSpitzer commented on a change in pull request #1228:
URL: https://github.com/apache/iceberg/pull/1228#discussion_r458918870



##########
File path: spark/src/main/java/org/apache/iceberg/spark/SparkTableUtil.java
##########
@@ -386,7 +386,7 @@ private static SparkPartition toSparkPartition(CatalogTablePartition partition,
     Preconditions.checkArgument(serde.nonEmpty() || table.provider().nonEmpty(),
         "Partition format should be defined");
 
-    String uri = String.valueOf(locationUri.get());
+    URI uri = locationUri.get();

Review comment:
       Yes, Like I wrote on the issue. The constructor of Path(string) assumes the string is decoded. The constructor of Path(Uri) has a URI so it knows it's encoded. That's why we can also fix this by reconverting back to a URI at the last moment (basically re asserting the encoding)




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

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