JingsongLi commented on code in PR #584:
URL: https://github.com/apache/incubator-paimon/pull/584#discussion_r1151429626


##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/source/DataTableSource.java:
##########
@@ -198,13 +202,45 @@ public ScanRuntimeProvider 
getScanRuntimeProvider(ScanContext scanContext) {
                         .withProjection(projectFields)
                         .withPredicate(predicate)
                         .withLimit(limit)
-                        .withParallelism(
-                                Options.fromMap(table.schema().options())
-                                        
.get(FlinkConnectorOptions.SCAN_PARALLELISM))
                         .withWatermarkStrategy(watermarkStrategy);
 
         return new PaimonDataStreamScanProvider(
-                !streaming, env -> sourceBuilder.withEnv(env).build());
+                !streaming,
+                env -> {
+                    Tuple2<Integer, List<Split>> scanContent = scanContent();
+                    return sourceBuilder
+                            .withParallelism(scanContent.f0)
+                            .withSplits(scanContent.f1)
+                            .withEnv(env)
+                            .build();
+                });
+    }
+
+    private Tuple2<Integer, List<Split>> scanContent() {

Review Comment:
   maybe `void configureSource(SourceBuilder source)` here?



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

Reply via email to