dianfu commented on a change in pull request #16240:
URL: https://github.com/apache/flink/pull/16240#discussion_r656703620



##########
File path: flink-python/pyflink/table/tests/test_udaf.py
##########
@@ -543,24 +543,25 @@ def test_tumbling_group_window_over_time(self):
 
         from pyflink.testing import source_sink_utils
         table_sink = source_sink_utils.TestAppendSink(
-            ['a', 'b', 'c', 'd'],
+            ['a', 'b', 'c', 'd', 'e'],
             [
                 DataTypes.TINYINT(),
                 DataTypes.TIMESTAMP(3),
                 DataTypes.TIMESTAMP(3),
+                DataTypes.BIGINT(),
                 DataTypes.BIGINT()])
         self.t_env.register_table_sink("Results", table_sink)
         t.window(Tumble.over("1.hours").on("rowtime").alias("w")) \
             .group_by("a, w") \
-            .select("a, w.start, w.end, my_count(c) as c") \
+            .select("a, w.start, w.end, COUNT(c) as c, my_count(c) as d") \
             .execute_insert("Results") \
             .wait()
         actual = source_sink_utils.results()
         self.assert_equals(actual,
-                           ["+I[2, 2018-03-11 03:00:00.0, 2018-03-11 
04:00:00.0, 1]",
-                            "+I[3, 2018-03-11 03:00:00.0, 2018-03-11 
04:00:00.0, 1]",
-                            "+I[1, 2018-03-11 03:00:00.0, 2018-03-11 
04:00:00.0, 2]",
-                            "+I[1, 2018-03-11 04:00:00.0, 2018-03-11 
05:00:00.0, 1]"])
+                           ["+I[2, 2018-03-11 03:00:00.0, 2018-03-11 
04:00:00.0, 2, 1]",

Review comment:
       It is a little wired that the results are not equal. Is this expected?

##########
File path: 
flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/rules/physical/stream/StreamPhysicalPythonGroupWindowAggregateRule.java
##########
@@ -77,7 +77,11 @@ public boolean matches(RelOptRuleCall call) {
                 aggCalls.stream()
                         .anyMatch(x -> PythonUtil.isPythonAggregate(x, 
PythonFunctionKind.PANDAS));
         boolean existJavaFunction =
-                aggCalls.stream().anyMatch(x -> 
!PythonUtil.isPythonAggregate(x, null));
+                aggCalls.stream()

Review comment:
       Does the issue also exist in StreamPhysicalPythonOverAggregateRule, 
BatchPhysicalPythonAggregateRule, BatchPhysicalPythonWindowAggregateRule?




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