vladislav-sidorovich commented on code in PR #15407:
URL: https://github.com/apache/iceberg/pull/15407#discussion_r3143767808


##########
delta-lake/src/main/java/org/apache/iceberg/delta/BaseSnapshotDeltaLakeTableAction.java:
##########
@@ -450,11 +448,12 @@ private void tagCurrentSnapshot(long deltaVersion, 
Transaction transaction) {
    */
   private static String getFullFilePath(String path, String tableRoot) {
     URI dataFileUri = URI.create(path);
-    String decodedPath = URLDecoder.decode(path, StandardCharsets.UTF_8);
     if (dataFileUri.isAbsolute()) {
-      return decodedPath;
+      return dataFileUri.getScheme().equalsIgnoreCase("file") ? 
dataFileUri.getPath() : path;
     } else {
-      return tableRoot + File.separator + decodedPath;
+      String decodedPath = dataFileUri.getPath();
+      String separator = tableRoot.contains(":/") ? "/" : File.separator;
+      return tableRoot + (tableRoot.endsWith(separator) ? "" : separator) + 
decodedPath;

Review Comment:
   It's the fix to use `File.separator` only for `real` file systems, but you 
are right. `BaseSnapshotDeltaLakeTableAction` should be completely replaced so 
I would prefer do not touch it.  
   
   Reverted.



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