pvary commented on code in PR #17873:
URL: https://github.com/apache/iceberg/pull/17873#discussion_r3894818129


##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java:
##########
@@ -331,9 +368,26 @@ public List<String> listTables(String databaseName)
   }
 
   @Override
-  public CatalogTable getTable(ObjectPath tablePath)
+  public CatalogBaseTable getTable(ObjectPath tablePath)
       throws TableNotExistException, CatalogException {
-    Table table = loadIcebergTable(tablePath);
+    Table table;
+    try {
+      table = loadIcebergTable(tablePath);
+    } catch (TableNotExistException e) {
+      // metadata tables ("name$type") can never be views, and without a view 
catalog there is
+      // nothing else to look up
+      if (asViewCatalog == null || tablePath.getObjectName().contains("$")) {

Review Comment:
   This check could be a method, and could be reused in `exists`, `drop` too



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