snazy commented on code in PR #10630:
URL: https://github.com/apache/iceberg/pull/10630#discussion_r1665606754


##########
nessie/src/main/java/org/apache/iceberg/nessie/NessieCatalog.java:
##########
@@ -290,6 +291,14 @@ public void renameTable(TableIdentifier from, 
TableIdentifier to) {
 
   @Override
   public void createNamespace(Namespace namespace, Map<String, String> 
metadata) {
+    if (namespace.levels().length > 1) {

Review Comment:
   This would fail, if a parent namespace already exists.
   
   A better place to do this would be 
`org.apache.iceberg.nessie.NessieIcebergClient#createNamespace`:
   * load all required namespaces
   * add the `Put` operation for all non-existing parent namespaces to the 
commit operation
   
   OTOH I'm not sure about the actual contract of this function. Some 
implementation seem to allow creating a namespaces when parent namespaces do 
not exist - so the contract isn't clear, aka the functionality per se seems 
okay 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]

Reply via email to