rdblue commented on code in PR #4826:
URL: https://github.com/apache/iceberg/pull/4826#discussion_r928325040
##########
nessie/src/main/java/org/apache/iceberg/nessie/NessieCatalog.java:
##########
@@ -181,10 +182,15 @@ 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:
This looks reasonable to me.
--
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]