lincoln-lil commented on code in PR #25291:
URL: https://github.com/apache/flink/pull/25291#discussion_r1746433091
##########
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:
Should add a check if an error occurs.
##########
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:
What'll happen if not use `.runtimeProvided()`?
--
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]