tedyu commented on code in PR #12812:
URL: https://github.com/apache/iceberg/pull/12812#discussion_r2049360573


##########
core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java:
##########
@@ -917,6 +917,15 @@ public void testLoadTable() {
         .containsAll(properties.entrySet());
   }
 
+  @Test
+  public void testLoadTableWithNonExistingNamespace() {
+    TableIdentifier ident = TableIdentifier.of("non-existing", "tbl");
+    assertThat(catalog().tableExists(ident)).as("Table should not 
exist").isFalse();
+    assertThatThrownBy(() -> catalog().loadTable(ident))
+        .isInstanceOf(NoSuchTableException.class)
+        .hasMessageStartingWith("Table does not exist: %s", ident);

Review Comment:
   ```
             throw new NoSuchTableException("Table does not exist: %s", 
identifier);
   ```
   I wonder if punctuation (or a space) should be added at the end of message 
where the exception is thrown so that we eliminate the chance of false positive.



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