dimas-b commented on code in PR #4826:
URL: https://github.com/apache/iceberg/pull/4826#discussion_r1013194544


##########
nessie/src/main/java/org/apache/iceberg/nessie/NessieCatalog.java:
##########
@@ -199,10 +200,16 @@ protected TableOperations newTableOps(TableIdentifier 
tableIdentifier) {
 
   @Override
   protected String defaultWarehouseLocation(TableIdentifier table) {
+    String location;
     if (table.hasNamespace()) {
-      return SLASH.join(warehouseLocation, table.namespace().toString(), 
table.name());
+      location = SLASH.join(warehouseLocation, table.namespace().toString(), 
table.name());
+    } else {
+      location = SLASH.join(warehouseLocation, table.name());
     }
-    return SLASH.join(warehouseLocation, table.name());
+    // Different tables with same table name can exist across references in 
Nessie.
+    // To avoid sharing same table path between two tables with same name, use 
uuid in the table
+    // path.
+    return location + "_" + UUID.randomUUID();

Review Comment:
   My point is about the implications of the method name, which seems to imply 
that the location is a pure function of the table identifier (regardless of how 
many times it is called).



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