dpaani opened a new issue, #7187:
URL: https://github.com/apache/iceberg/issues/7187
### Feature Request / Improvement
Currently, the LocationProvider interface only provides a way to retrieve
the new file location. However, if one wants to obtain the location of the data
folder for a specific table, there are too many table properties to consider,
and the current Iceberg implementation lacks any public APIs for this purpose.
It would be beneficial to expose the following API within the
LocationProvider interface:
```
/**
* Returns a fully-qualified data location for a table.
*
* @return a fully-qualified data location URI
*/
default String dataLocation() {
throw new UnsupportedOperationException("dataLocation() not
implemented");
}
```
Furthermore, the logic for obtaining the metadata location is duplicated in
multiple places, including the following classes:
AddFilesProcedure.java (for all Spark versions)
BaseTableCreationSparkAction.java
RESTTableOperations.java
It would be helpful if Iceberg added a MetadataLocationProvider to the
LocationProviders.java class, similar to the Data LocationProvider, and also
included a metadataLocationProvider API within the TableMetadata class for
public use like.
```
public interface MetadataLocationProvider extends Serializable {
String metadataLocation();
String newMetadataLocation(String filename);
}
```
### Query engine
None
--
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]