Fokko commented on PR #5405:
URL: https://github.com/apache/iceberg/pull/5405#issuecomment-1204340849

   @rdblue Thanks for reviewing. It is when the location is somewhere without a 
child. The trailing `/` is removed from hive warehouse dir. This way you can 
never use a base url because it thinks it is a relative path:
   ```
   Welcome to
         ____              __
        / __/__  ___ _____/ /__
       _\ \/ _ \/ _ `/ __/  '_/
      /___/ .__/\_,_/_/ /_/\_\   version 3.3.0
         /_/
            
   Using Scala version 2.12.15 (OpenJDK 64-Bit Server VM, Java 18.0.2)
   Type in expressions to have them evaluated.
   Type :help for more information.
   
   scala> import org.apache.hadoop.fs.Path
   import org.apache.hadoop.fs.Path
   
   scala> new Path("s3://warehouse", "nyc")
   java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative 
path in absolute URI: s3://warehousenyc
     at org.apache.hadoop.fs.Path.initialize(Path.java:263)
     at org.apache.hadoop.fs.Path.<init>(Path.java:161)
     at org.apache.hadoop.fs.Path.<init>(Path.java:119)
     ... 43 elided
   Caused by: java.net.URISyntaxException: Relative path in absolute URI: 
s3://warehousenyc
     at java.base/java.net.URI.checkPath(URI.java:1998)
     at java.base/java.net.URI.<init>(URI.java:780)
     at org.apache.hadoop.fs.Path.initialize(Path.java:260)
     ... 45 more
   
   scala> new Path("s3://warehouse/", "nyc")
   res2: org.apache.hadoop.fs.Path = s3://warehouse/nyc
   
   scala> new Path("s3://warehouse/abc", "nyc")
   res3: org.apache.hadoop.fs.Path = s3://warehouse/abc/nyc
   ```
   I think we should just remove the Hadoop Path here.


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