xiangqiao123 commented on a change in pull request #17826:
URL: https://github.com/apache/flink/pull/17826#discussion_r757281586



##########
File path: 
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveParallelismInference.java
##########
@@ -63,10 +63,10 @@ int limit(Long limit) {
             return parallelism;
         }
 
-        if (limit != null) {
-            parallelism = Math.min(parallelism, (int) (limit / 1000));
+        if (!infer || limit == null) {

Review comment:
       @luoyuxia Thank you for your review.
   > I mean If set table.exec.hive.infer-source-parallelism = false, it will 
always return the table.exec.resource.default-parallelism configured by user.
   > And if it's -1 , it will fallback to the parallelism of 
StreamExecutionEnvironment.
   
   if `set table.exec.hive.infer-source-parallelism = false` and 
`table.exec.resource.default-parallelism` is not set by user so it is default 
value -1, current logic of method `int limit(Long limit) ` return 1, and will 
not fallback to the parallelism of StreamExecutionEnvironment.
   




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

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


Reply via email to