huyuanfeng2018 commented on code in PR #9606: URL: https://github.com/apache/iceberg/pull/9606#discussion_r1506909261
########## flink/v1.18/flink/src/main/java/org/apache/iceberg/flink/FlinkDynamicTableFactory.java: ########## @@ -187,7 +188,7 @@ private static TableLoader createTableLoader( // Create table if not exists in the external catalog. if (!flinkCatalog.tableExists(objectPath)) { try { - flinkCatalog.createIcebergTable(objectPath, catalogBaseTable, true); + flinkCatalog.createIcebergTable(objectPath, (ResolvedCatalogTable) catalogBaseTable, true); Review Comment: > I'm a bit uncomfortable with this cast. I don't have time ATM, but how complicated would be to change the method parameter type to ResolvedCatalogTable? In flinkās top-level interface `org.apache.flink.table.catalog`, it is ensured that the incoming table type is `ResolvedCatalogBaseTable`  Has converted `catalogBaseTable` into `ResolvedCatalogBaseTable` in flink, so I think we can cast directly here  > If it is complicated, or the resulting change is too big, then minimally an instanceof precondition check would be nice I agree that a pre-verification needs to be added here. I will add a verification. This is the implementation of hive catalog:  -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org