lincoln-lil commented on code in PR #25291:
URL: https://github.com/apache/flink/pull/25291#discussion_r1746748346
##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/utils/AggregateUtil.scala:
##########
@@ -501,9 +497,17 @@ object AggregateUtil extends Enumeration {
hasStateBackedDataViews: Boolean,
needsRetraction: Boolean): AggregateInfo =
call.getAggregation match {
+ // In the new function stack, for imperativeFunction, the conversion from
+ // BuiltInFunctionDefinition to SqlAggFunction is unnecessary, we can
simply create
+ // AggregateInfo through BuiltInFunctionDefinition and runtime
implementation (obtained from
+ // AggFunctionFactory) directly.
+ // NOTE: make sure to use .runtimeProvided() in
BuiltInFunctionDefinition in this case.
Review Comment:
So if someone adds a new agg func that is declared in the wrong way, it will
not pass the test (the test case should cover both sql and table api).
In that case I have no problem.
--
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]