beyond1920 commented on a change in pull request #16669:
URL: https://github.com/apache/flink/pull/16669#discussion_r681725998



##########
File path: 
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/rules/logical/SplitAggregateRule.scala
##########
@@ -138,11 +139,14 @@ class SplitAggregateRule extends RelOptRule(
     val windowProps = fmq.getRelWindowProperties(agg.getInput)
     val isWindowAgg = 
WindowUtil.groupingContainsWindowStartEnd(agg.getGroupSet, windowProps)
     val isProctimeWindowAgg = isWindowAgg && !windowProps.isRowtime
+    val isSessionWindowAgg = isWindowAgg &&
+      windowProps.getWindowSpec.isInstanceOf[SessionWindowSpec]
     // TableAggregate is not supported. see also FLINK-21923.
     val isTableAgg = AggregateUtil.isTableAggregate(agg.getAggCallList)
 
     agg.partialFinalType == PartialFinalType.NONE && 
agg.containsDistinctCall() &&
-      splitDistinctAggEnabled && isAllAggSplittable && !isProctimeWindowAgg && 
!isTableAgg
+      splitDistinctAggEnabled && isAllAggSplittable && !isProctimeWindowAgg &&
+      !isSessionWindowAgg && !isTableAgg

Review comment:
       The only modify is to disable distinct split for session window.
   I have added a comment to explain for why disable distinct split for session 
window.




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