HuangXingBo commented on a change in pull request #13388:
URL: https://github.com/apache/flink/pull/13388#discussion_r490664786



##########
File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/physical/batch/BatchExecSortAggRule.scala
##########
@@ -65,7 +67,13 @@ class BatchExecSortAggRule
 
   override def matches(call: RelOptRuleCall): Boolean = {
     val tableConfig = 
call.getPlanner.getContext.unwrap(classOf[FlinkContext]).getTableConfig
-    !isOperatorDisabled(tableConfig, OperatorType.SortAgg)
+    val agg: FlinkLogicalAggregate = call.rel(0)
+    !isOperatorDisabled(tableConfig, OperatorType.SortAgg) &&
+      !agg.getAggCallList.exists(x => {
+        val aggregation = x.getAggregation

Review comment:
       Yes. Make sense.




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


Reply via email to