use of org.apache.flink.table.functions.AggregateFunction in project flink by apache.
the class FunctionCatalog method registerTempSystemAggregateFunction.
/**
* @deprecated Use {@link #registerTemporarySystemFunction(String, FunctionDefinition, boolean)}
* instead.
*/
@Deprecated
public <T, ACC> void registerTempSystemAggregateFunction(String name, ImperativeAggregateFunction<T, ACC> function, TypeInformation<T> resultType, TypeInformation<ACC> accType) {
UserDefinedFunctionHelper.prepareInstance(config, function);
final FunctionDefinition definition;
if (function instanceof AggregateFunction) {
definition = new AggregateFunctionDefinition(name, (AggregateFunction<?, ?>) function, resultType, accType);
} else if (function instanceof TableAggregateFunction) {
definition = new TableAggregateFunctionDefinition(name, (TableAggregateFunction<?, ?>) function, resultType, accType);
} else {
throw new TableException("Unknown function class: " + function.getClass());
}
registerTempSystemFunction(name, definition);
}
Aggregations