You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "kevinjqliu (via GitHub)" <gi...@apache.org> on 2025/08/09 19:02:42 UTC
Re: [PR] Strip trailing slash from default warehouse location [iceberg]
kevinjqliu commented on code in PR #13710:
URL: https://github.com/apache/iceberg/pull/13710#discussion_r2264929520
##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java:
##########
@@ -707,7 +707,8 @@ protected String defaultWarehouseLocation(TableIdentifier tableIdentifier) {
clients.run(client -> client.getDatabase(tableIdentifier.namespace().levels()[0]));
if (databaseData.getLocationUri() != null) {
// If the database location is set use it as a base.
- return String.format("%s/%s", databaseData.getLocationUri(), tableIdentifier.name());
+ String stripLocationUri = LocationUtil.stripTrailingSlash(databaseData.getLocationUri());
+ return String.format("%s/%s", stripLocationUri, tableIdentifier.name());
Review Comment:
maybe add something like [this](https://github.com/apache/iceberg/blob/main/aws/src/test/java/org/apache/iceberg/aws/glue/TestGlueCatalog.java#L134-L142) to https://github.com/apache/iceberg/blob/c8c61a3f6b60499f09e5047c5c9d8a3c02d9fb72/hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveCatalog.java#L95
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org