pvary commented on code in PR #10832: URL: https://github.com/apache/iceberg/pull/10832#discussion_r1713650563
########## flink/v1.19/flink/src/main/java/org/apache/iceberg/flink/source/IcebergSource.java: ########## @@ -205,12 +225,35 @@ private SplitEnumerator<IcebergSourceSplit, IcebergEnumeratorState> createEnumer // Only do scan planning if nothing is restored from checkpoint state List<IcebergSourceSplit> splits = planSplitsForBatch(planningThreadName()); assigner.onDiscoveredSplits(splits); + // clear the cached splits after enumerator creation as they won't be needed anymore + this.batchSplits = null; } return new StaticIcebergEnumerator(enumContext, assigner); } } + boolean shouldInferParallelism() { Review Comment: nit: could this be private? ########## flink/v1.19/flink/src/main/java/org/apache/iceberg/flink/source/IcebergSource.java: ########## @@ -205,12 +225,35 @@ private SplitEnumerator<IcebergSourceSplit, IcebergEnumeratorState> createEnumer // Only do scan planning if nothing is restored from checkpoint state List<IcebergSourceSplit> splits = planSplitsForBatch(planningThreadName()); assigner.onDiscoveredSplits(splits); + // clear the cached splits after enumerator creation as they won't be needed anymore + this.batchSplits = null; } return new StaticIcebergEnumerator(enumContext, assigner); } } + boolean shouldInferParallelism() { + return !scanContext.isStreaming(); + } + + int inferParallelism(ReadableConfig flinkConf, StreamExecutionEnvironment env) { Review Comment: nit: could this be private? -- 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