RussellSpitzer commented on issue #6758:
URL: https://github.com/apache/iceberg/issues/6758#issuecomment-1421559622

   My call would be that everything new file we create with FileIO (in iceberg) 
hits this transformation
   
   ```scala
   import java.nio.file.Paths
   scala> def posixNormalize(s: String) = Paths.get(s).normalize.toString
   posixNormalize: (s: String)String
   scala> posixNormalize("s3://foo/bar/../baz")
   res41: String = s3:/foo/baz
   ```
   
   So I would add that as an protected method in FileIO and then any calls to   
   OutputFile newOutputFile(String path);
   
   call posixNormalize before doing anything else. Ideally I wish I could force 
this on all calls to newOutputFile but I don't think we can manage that without 
breaking the API. Maybe we can do that in Iceberg 2.0 and have 
   
   ```java
   final OutputFile newOutputFile(String path) {
     return newOutputFileImpl(posixNormalize(path))
   }
   
   OutputFile newOutputFileImpl(String path)
   ```


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

Reply via email to