adutra commented on code in PR #9877:
URL: https://github.com/apache/iceberg/pull/9877#discussion_r1514477117


##########
nessie/src/main/java/org/apache/iceberg/nessie/NessieIcebergClient.java:
##########
@@ -308,6 +308,10 @@ public List<Namespace> listNamespaces(Namespace namespace) 
throws NoSuchNamespac
   }
 
   public boolean dropNamespace(Namespace namespace) throws 
NamespaceNotEmptyException {
+    if (namespace.isEmpty()) {
+      // As creating empty namespaces is not supported
+      throw new NoSuchNamespaceException("Namespace does not exist: %s", 
namespace);

Review Comment:
   I'd wrap the namespace name in single quotes, as it is done in other places; 
it gives more understandable messages for empty namespaces.



##########
nessie/src/main/java/org/apache/iceberg/nessie/NessieIcebergClient.java:
##########
@@ -380,6 +389,10 @@ public boolean removeProperties(Namespace namespace, 
Set<String> properties) {
   }
 
   private boolean updateProperties(Namespace namespace, Consumer<Map<String, 
String>> action) {
+    if (namespace.isEmpty()) {
+      // As creating empty namespaces is not supported
+      throw new IllegalArgumentException("Does not support empty namespace");

Review Comment:
   The sentence does not have a subject. How about "Empty namespaces not 
supported"?



-- 
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-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to