lgbo-ustc commented on code in PR #12304:
URL: https://github.com/apache/gluten/pull/12304#discussion_r3425444056


##########
gluten-flink/planner/src/main/java/org/apache/gluten/velox/NexmarkSourceFactory.java:
##########
@@ -72,26 +82,32 @@ public Transformation<RowData> buildVeloxSource(
                 "getSplits",
                 new Class<?>[] {int.class},
                 new Object[] {transformation.getParallelism()});
-    Object nexmarkSourceSplit = nexmarkSourceSplits.get(0);
-    Object generatorConfig =
-        ReflectUtils.getObjectField(
-            nexmarkSourceSplit.getClass(), nexmarkSourceSplit, 
"generatorConfig");
-    Long maxEvents =
-        (Long)
-            ReflectUtils.getObjectField(generatorConfig.getClass(), 
generatorConfig, "maxEvents");
+
+    // Convert each subtask's GeneratorConfig to velox4j
+    List<NexmarkConnectorSplit> subtaskSplits = new ArrayList<>();
+    for (Object nexmarkSourceSplit : nexmarkSourceSplits) {
+      Object generatorConfig =
+          ReflectUtils.getObjectField(
+              nexmarkSourceSplit.getClass(), nexmarkSourceSplit, 
"generatorConfig");
+      subtaskSplits.add(
+          new NexmarkConnectorSplit(
+              "connector-nexmark", toVeloxGeneratorConfig(generatorConfig), 
null));

Review Comment:
   for safty, subtask splits shoud use a non-ParallelSplit class



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