Github user sunjincheng121 commented on a diff in the pull request:
https://github.com/apache/flink/pull/4105#discussion_r121324222
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/utils/AggSqlFunction.scala
---
@@ -37,24 +36,26 @@ import
org.apache.flink.table.functions.utils.UserDefinedFunctionUtils._
* @param name function name (used by SQL parser)
* @param aggregateFunction aggregate function to be called
* @param returnType the type information of returned value
+ * @param accType the type information of the accumulator
* @param typeFactory type factory for converting Flink's between
Calcite's types
*/
class AggSqlFunction(
name: String,
aggregateFunction: AggregateFunction[_, _],
- returnType: TypeInformation[_],
+ val returnType: TypeInformation[_],
+ val accType: TypeInformation[_],
typeFactory: FlinkTypeFactory,
requiresOver: Boolean)
- extends SqlUserDefinedAggFunction(
+ extends SqlAggFunction(
--- End diff --
Why we need change `SqlUserDefinedAggFunction` to `SqlAggFunction`. Is
there some reasons? If so, please explain more about.
If not so, I suggest keeping using `SqlUserDefinedAggFunction`. Because
`SqlUserDefinedAggFunction` is provided by Calcite which related the UDAG, in
order to adapt to Calcite changes I recommend keeping using
`SqlUserDefinedAggFunction`. (Although the `SqlUserDefinedAggFunction` of
calcite is covered by the current flink.).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---