mxm commented on code in PR #18582:
URL: https://github.com/apache/iceberg/pull/18582#discussion_r4313816763
##########
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:
Wouldn't this cover all scenarios? Do we still need the old `exists.f1
instanceof NoSuchNamespaceException` check? In that case, can we inline the
method?
--
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]