JingsongLi commented on a change in pull request #8718:
[FLINK-12824][table-planner-blink] Set parallelism for stream SQL
URL: https://github.com/apache/flink/pull/8718#discussion_r293282356
##########
File path:
flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/plan/nodes/resource/parallelism/FinalParallelismSetter.java
##########
@@ -97,12 +123,22 @@ private void calculateSingleton(ExecNode<?, ?> execNode) {
finalParallelismNodeMap.put(execNode,
1);
return;
}
+ } else if (inputNode instanceof StreamExecExchange) {
+ // set parallelism as 1 to GlobalAggregate and
other global node.
+ if (((StreamExecExchange)
inputNode).getDistribution().getType() == RelDistribution.Type.SINGLETON) {
+ finalParallelismNodeMap.put(execNode,
1);
+ return;
+ }
}
}
}
- private void calculateValues(BatchExecValues valuesBatchExec) {
- finalParallelismNodeMap.put(valuesBatchExec, 1);
+ private void calculateValues(BatchExecValues valuesExec) {
+ finalParallelismNodeMap.put(valuesExec, 1);
+ }
+
+ private void calculateValues(StreamExecValues valuesExec) {
Review comment:
Use `Values`?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services