jackye1995 commented on issue #1617:
URL: https://github.com/apache/iceberg/issues/1617#issuecomment-879193232


   > If so it highlights how tricky could it be if we want to make sure that 
every LocationProvider specific parameter is handled correctly when we are 
updating the locations in the metadata json
   
   Yes, that is why I was proposing if we decide to go with relative path, 
`LocationProvider` should expose a method that describes the true file path 
root it is using, maybe something like `LocationProvider.root()`, and any 
plugin implementation can override this method if necessary. But 
`LocationProvider` only governs the path for data files, and metadata file 
paths are governed by `TableOperations.metadataFileLocation(String fileName), 
so we should also have a new method like `TableOperations.metadataRoot()` to 
describe the true root. Those 2 roots should be sufficient for any reader and 
writer to use if they stick with the Iceberg core IO library.
   
   On Trino side it's quite more complicated because some paths are hard coded 
and directly generated based on Hive conventions, but I think that is an issue 
to fix on Trino side: 
https://github.com/trinodb/trino/blob/master/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSink.java#L303-L308
   
   But just keep in mind that there is always a risk for a compute engine to 
not stick with those things, and it will be hard to enforce.
   
   


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