You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "tprelle (via GitHub)" <gi...@apache.org> on 2023/01/27 12:32:43 UTC

[GitHub] [iceberg] tprelle commented on a diff in pull request #6676: Nessie : use default namespace location if exists

tprelle commented on code in PR #6676:
URL: https://github.com/apache/iceberg/pull/6676#discussion_r1088910905


##########
nessie/src/main/java/org/apache/iceberg/nessie/NessieCatalog.java:
##########
@@ -202,7 +202,16 @@ protected TableOperations newTableOps(TableIdentifier tableIdentifier) {
   protected String defaultWarehouseLocation(TableIdentifier table) {
     String location;
     if (table.hasNamespace()) {
-      location = SLASH.join(warehouseLocation, table.namespace().toString(), table.name());
+      String baseLocation;
+      try {
+        baseLocation =
+            loadNamespaceMetadata(table.namespace())
+                .getOrDefault(
+                    "location", SLASH.join(warehouseLocation, table.namespace().toString()));

Review Comment:
   @ajantha-bhat, i ask myself the same question but as in multiple files in iceberg code (table metadata parser, flink, spark, jdbc, etc...) "location" is used and not a standardize variable.
   I can not use spark or hive one because i do not want to add spark or hive dependency to iceberg-nessie. 
   If the namespace it's created using flink, spark or hive at least like 'CREATE namespace t LOCATION 'somewhere'' it will populate this "location" property.  
   
   I just push a new version where i put the static variable on the BaseMetastoreCatalog



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