kumarpritam863 commented on code in PR #18582:
URL: https://github.com/apache/iceberg/pull/18582#discussion_r4315112054


##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/TableUpdater.java:
##########
@@ -100,6 +100,18 @@ private void findOrCreateTable(
     }
   }
 
+  /**
+   * Some catalogs, such as the Glue catalog, report a table in a namespace 
that does not exist as a
+   * {@link org.apache.iceberg.exceptions.NoSuchTableException} rather than a 
{@link
+   * NoSuchNamespaceException}, so the lookup alone cannot tell a missing 
table from a missing
+   * namespace. Ask the catalog directly.
+   */
+  private boolean namespaceIsMissing(TableIdentifier identifier) {
+    return catalog instanceof SupportsNamespaces
+        && !identifier.namespace().isEmpty()
+        && !((SupportsNamespaces) 
catalog).namespaceExists(identifier.namespace());

Review Comment:
   Thanks @mxm for the review. Yes that one check is enough and i have replaced 
it with an inline function call. Also I will make sure from the next time that 
the changes are for latest version only. 



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