dramaticlly commented on code in PR #13710:
URL: https://github.com/apache/iceberg/pull/13710#discussion_r2243925525


##########
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:
   @prakhar10 can you add a corresponding unit test to illustrate the failure 
before and success after this change?



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