chenjunjiedada commented on code in PR #6407: URL: https://github.com/apache/iceberg/pull/6407#discussion_r1068041295
########## flink/v1.16/flink/src/main/java/org/apache/iceberg/flink/source/FlinkInputFormat.java: ########## @@ -79,15 +68,9 @@ public BaseStatistics getStatistics(BaseStatistics cachedStatistics) { @Override public FlinkInputSplit[] createInputSplits(int minNumSplits) throws IOException { // Called in Job manager, so it is OK to load table from catalog. - tableLoader.open(); final ExecutorService workerPool = ThreadPools.newWorkerPool("iceberg-plan-worker-pool", context.planParallelism()); - try (TableLoader loader = tableLoader) { - Table table = loader.loadTable(); - return FlinkSplitPlanner.planInputSplits(table, context, workerPool); - } finally { - workerPool.shutdown(); - } + return FlinkSplitPlanner.planInputSplits(table, context, workerPool); Review Comment: Flink source uses the monitor function to monitor snapshots and forward splits to `StreamingReaderOperator`, `StreamingReaderOperator` uses `FlinkInputFormat` to open splits. Opening splits should work even the table is readonly. -- 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