stevenzwu commented on code in PR #6407:
URL: https://github.com/apache/iceberg/pull/6407#discussion_r1068333995
##########
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:
yeah. using readonly table for reader function is fine.
--
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]