XuPingyong commented on a change in pull request #8690: 
[FLINK-12801][table-planner-blink] set parallelism for batch SQL
URL: https://github.com/apache/flink/pull/8690#discussion_r292889377
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/metadata/FlinkRelMdRowCount.scala
 ##########
 @@ -171,7 +171,8 @@ class FlinkRelMdRowCount private extends 
MetadataHandler[BuiltInMetadata.RowCoun
     } else {
       val inputRowCnt = mq.getRowCount(input)
       val config = 
rel.getCluster.getPlanner.getContext.asInstanceOf[FlinkContext].getTableConfig
-      val parallelism = NodeResourceConfig.calOperatorParallelism(inputRowCnt, 
config.getConf)
+      val parallelism = (inputRowCnt /
+          
config.getConf.getLong(PlannerConfigOptions.SQL_OPTIMIZER_ROWS_PER_LOCALAGG) + 
1).toInt
 
 Review comment:
   LocalAgg degree was depend on parallelism calculating that happens after 
plan optimizing, it is unreasonable. So it predicts parallelism itself, that 
cause no conflict.

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

Reply via email to