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


##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java:
##########
@@ -433,8 +442,20 @@ private Table loadIcebergTable(ObjectPath tablePath) 
throws TableNotExistExcepti
   @Override
   public boolean tableExists(ObjectPath tablePath) throws CatalogException {
     TableIdentifier identifier = toIdentifier(tablePath);
-    return icebergCatalog.tableExists(identifier)
-        || (canBeView(tablePath) && asViewCatalog.viewExists(identifier));
+    if (icebergCatalog.tableExists(identifier)) {
+      return true;
+    }
+
+    if (!canBeView(tablePath)) {
+      return false;
+    }
+
+    try {
+      return asViewCatalog.viewExists(identifier);
+    } catch (UnsupportedOperationException e) {
+      // implements ViewCatalog but rejects view operations in JDBC catalog 
with V0 schema
+      return false;

Review Comment:
   Shall we log?



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