stevenzwu commented on code in PR #5318:
URL: https://github.com/apache/iceberg/pull/5318#discussion_r926174163


##########
flink/v1.15/flink/src/main/java/org/apache/iceberg/flink/source/IcebergTableSource.java:
##########
@@ -111,6 +118,32 @@ private DataStream<RowData> 
createDataStream(StreamExecutionEnvironment execEnv)
         .build();
   }
 
+  private DataStreamSource<RowData> 
createFLIP27Stream(StreamExecutionEnvironment env) {
+    SplitAssignerType assignerType = 
readableConfig.get(FlinkConfigOptions.TABLE_EXEC_SPLIT_ASSIGNER_TYPE);
+    IcebergSource<RowData> source = IcebergSource.forRowData()
+        .tableLoader(loader)
+        .assignerFactory(assignerType.factory())
+        .properties(properties)
+        .project(getProjectedSchema())
+        .limit(limit)
+        .filters(filters)
+        .flinkConfig(readableConfig)
+        .build();
+    DataStreamSource stream = env.fromSource(
+        source, WatermarkStrategy.noWatermarks(), source.name(), 
TypeInformation.of(RowData.class));
+
+    if (source.getBoundedness() == Boundedness.BOUNDED) {
+      int parallelism = SourceUtil.inferParallelism(readableConfig, limit, () 
-> source.planSplitsForBatch().size());

Review Comment:
   the expensive lambda function of `planSplitsForBatch` will only be executed 
if config is enabled



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