Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/4105#discussion_r124575144 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/utils/UserDefinedFunctionUtils.scala --- @@ -286,13 +286,21 @@ object UserDefinedFunctionUtils { def createAggregateSqlFunction( name: String, aggFunction: AggregateFunction[_, _], - typeInfo: TypeInformation[_], + extractedResultTypeInfo: TypeInformation[_], + accTypeInfo: TypeInformation[_], typeFactory: FlinkTypeFactory) : SqlFunction = { //check if a qualified accumulate method exists before create Sql function checkAndExtractMethods(aggFunction, "accumulate") - val resultType: TypeInformation[_] = getResultTypeOfAggregateFunction(aggFunction, typeInfo) - AggSqlFunction(name, aggFunction, resultType, typeFactory, aggFunction.requiresOver) + val resultType = getResultTypeOfAggregateFunction(aggFunction, extractedResultTypeInfo) --- End diff -- `getResultTypeOfAggregateFunction` was called before in `TableEnvironment`. Can we remove it here? If not, we also might want to double check the acc type.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---