amaliujia commented on a change in pull request #14791:
URL: https://github.com/apache/flink/pull/14791#discussion_r569187223



##########
File path: 
flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/rules/physical/stream/StreamPhysicalPythonGroupWindowAggregateRule.java
##########
@@ -98,7 +98,12 @@ public RelNode convert(RelNode rel) {
         FlinkLogicalWindowAggregate agg = (FlinkLogicalWindowAggregate) rel;
         LogicalWindow window = agg.getWindow();
 
-        if (window instanceof SessionGroupWindow) {
+        List<AggregateCall> aggCalls = agg.getAggCallList();
+        boolean isPandasPythonUDAF =
+                aggCalls.stream()
+                        .anyMatch(x -> PythonUtil.isPythonAggregate(x, 
PythonFunctionKind.PANDAS));
+
+        if (isPandasPythonUDAF && window instanceof SessionGroupWindow) {
             throw new TableException("Session Group Window is currently not 
supported.");

Review comment:
       Nit: probably `"Session Group Window is currently not supported for 
Pandas UDAF"`.
   
   Also why session window does not work when it is Pandas UDAF?




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