kumarpritam863 commented on code in PR #18582:
URL: https://github.com/apache/iceberg/pull/18582#discussion_r4470268687
##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/TableUpdater.java:
##########
@@ -78,11 +78,20 @@ private void findOrCreateTable(
TableIdentifier identifier, Schema schema, PartitionSpec spec,
TableCreator tableCreator) {
Tuple2<Boolean, Exception> exists = cache.exists(identifier);
if (Boolean.FALSE.equals(exists.f0)) {
- if (exists.f1 instanceof NoSuchNamespaceException) {
- SupportsNamespaces catalogWithNameSpace = (SupportsNamespaces) catalog;
+ Preconditions.checkState(
+ catalog instanceof SupportsNamespaces,
Review Comment:
Good point, that was a regression: before this PR such a catalog could still
create tables, since the cast only happened inside the NoSuchNamespaceException
branch. Removed the checkState. The namespace step now only runs for catalogs
that implement SupportsNamespaces; others go straight to createTable.
--
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]