sunjincheng121 commented on a change in pull request #8359: 
[FLINK-11051][table] Add streaming window FlatAggregate to Table API
URL: https://github.com/apache/flink/pull/8359#discussion_r283162404
 
 

 ##########
 File path: 
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/plan/TableOperationConverter.java
 ##########
 @@ -174,7 +161,18 @@ public RelNode 
visitWindowAggregate(WindowAggregateTableOperation windowAggregat
                                .collect(toList());
                        GroupKey groupKey = relBuilder.groupKey(groupings);
                        LogicalWindow logicalWindow = 
toLogicalWindow(windowAggregate.getGroupWindow());
-                       return flinkRelBuilder.aggregate(logicalWindow, 
groupKey, windowProperties, aggregations).build();
+                       return flinkRelBuilder.windowAggregate(logicalWindow, 
groupKey, windowProperties, aggregations).build();
+               }
+
+               /**
+                * Get the {@link AggCall} correspond to the aggregate 
expression.
+                */
+               private AggCall getAggCall(Expression aggregateExpression) {
+                       if 
(AggregateOperationFactory.isTableAggFunctionCall(aggregateExpression)) {
+                               return 
aggregateExpression.accept(tableAggregateVisitor);
+                       } else {
+                               return 
aggregateExpression.accept(aggregateVisitor);
+                       }
 
 Review comment:
   In general, we also need to check the` isAggFunctionCall` and throw an 
exception if false returned from `isAggFunctionCall`.  but I agree it works for 
the current use case. 

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