rdblue commented on code in PR #9787:
URL: https://github.com/apache/iceberg/pull/9787#discussion_r1501176399


##########
core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java:
##########
@@ -987,6 +987,13 @@ public void testListTables() {
     assertEmpty("Should not contain ns_2.table_1 after drop", catalog, ns2);
   }
 
+  @Test
+  public void listTablesForEmptyNamespace() {
+    Assertions.assertThatThrownBy(() -> 
catalog().listTables(Namespace.empty()))
+        .isInstanceOf(NoSuchNamespaceException.class)
+        .hasMessageMatching(".*Namespace does not exist.*|.*Invalid 
namespace.*");

Review Comment:
   Empty namespaces are valid. We may need another test config like 
`requiresNamespaceCreate` to distinguish between catalogs that can store 
objects in the empty namespace and those that can't.
   
   That would also solve the problem of different error messages.
   
   Another option is to support the empty namespace in the REST catalog by 
always returning an empty set for `listTables` and `listNamespaces`.



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