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


##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java:
##########
@@ -426,6 +427,11 @@ public void createTable(ObjectPath tablePath, 
CatalogBaseTable table, boolean ig
               + "create table without 'connector'='iceberg' related properties 
in an iceberg table.");
     }
 
+    if (table instanceof CatalogMaterializedTable) {
+      throw new UnsupportedOperationException(
+          "Materialized tables are not supported by Iceberg's Flink catalog.");
+    }
+
     Preconditions.checkArgument(table instanceof ResolvedCatalogTable, "table 
should be resolved");

Review Comment:
   Maybe:
   ```suggestion
   Preconditions.checkArgument(
       table instanceof ResolvedCatalogTable,
       "Expected a ResolvedCatalogTable but got: %s. "
           + "Iceberg Flink catalog only supports resolved catalog tables "
           + "(materialized tables and other table kinds are not supported).",
       table == null ? "null" : table.getClass().getName());```



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