reswqa commented on code in PR #1230:
URL: https://github.com/apache/incubator-paimon/pull/1230#discussion_r1205805294


##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/source/AbstractDataTableSource.java:
##########
@@ -214,7 +214,7 @@ private DataStream<RowData> configureSource(
             FlinkSourceBuilder sourceBuilder, StreamExecutionEnvironment env) {
         Options options = Options.fromMap(this.table.options());
         Integer parallelism = 
options.get(FlinkConnectorOptions.SCAN_PARALLELISM);
-        if (options.get(FlinkConnectorOptions.INFER_SCAN_PARALLELISM)) {
+        if (parallelism == null && 
options.get(FlinkConnectorOptions.INFER_SCAN_PARALLELISM)) {

Review Comment:
   It seems that we did not perform boundary check(e.g. `>0`) on `parallelism`. 
If `SCAN_PARALLELISM` is set to `-1`, 
`OperatorValidationUtils.validateParallelism` will not reject it because it is 
equal to `ExecutionConfig.PARALLELISM_DEFAULT`, which may cause some confusion. 
But it can always be argued that this is the behavior supported by `flink` 
(`-1` is considered the default parallelism). Just a comment, maybe not do this 
check here is exactly the right one. 🤔 



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