You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/04/02 05:55:11 UTC

[GitHub] [flink-table-store] JingsongLi commented on a change in pull request #67: [FLINK-26911] Introduce parallelism setter for table store

JingsongLi commented on a change in pull request #67:
URL: https://github.com/apache/flink-table-store/pull/67#discussion_r841016341



##########
File path: flink-table-store-connector/src/main/java/org/apache/flink/table/store/connector/source/TableStoreSource.java
##########
@@ -130,15 +135,29 @@ public DataStructureConverter createDataStructureConverter(
                             },
                             projectFields);
         }
-        TableStore.SourceBuilder builder =
+
+        TableStore.SourceBuilder sourceBuilder =
                 tableStore
                         .sourceBuilder()
                         .withContinuousMode(streaming)
                         .withLogSourceProvider(logSourceProvider)
                         .withProjection(projectFields)
                         .withPartitionPredicate(PredicateConverter.convert(partitionFilters))
-                        .withFieldPredicate(PredicateConverter.convert(fieldFilters));
-        return SourceProvider.of(builder.build());
+                        .withFieldPredicate(PredicateConverter.convert(fieldFilters))
+                        .withParallelism(tableStore.options().get(SCAN_PARALLELISM));
+
+        return new DataStreamScanProvider() {
+            @Override
+            public DataStream<RowData> produceDataStream(
+                    ProviderContext providerContext, StreamExecutionEnvironment env) {
+                return sourceBuilder.withEnv(env).build();
+            }
+
+            @Override
+            public boolean isBounded() {
+                return !streaming;

Review comment:
       hybrid mode must be streaming.




-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org