Search in sources :

Example 1 with AggregateFunctionFactory

use of io.confluent.ksql.function.AggregateFunctionFactory in project ksql by confluentinc.

the class DescribeFunctionExecutor method describeAggregateFunction.

private static FunctionDescriptionList describeAggregateFunction(final KsqlExecutionContext ksqlEngine, final FunctionName functionName, final String statementText) {
    final AggregateFunctionFactory aggregateFactory = ksqlEngine.getMetaStore().getAggregateFactory(functionName);
    final ImmutableList.Builder<FunctionInfo> listBuilder = ImmutableList.builder();
    aggregateFactory.eachFunction(func -> listBuilder.add(getFunctionInfo(func.parameterInfo(), func.declaredReturnType(), func.getDescription(), false)));
    return createFunctionDescriptionList(statementText, aggregateFactory.getMetadata(), listBuilder.build(), FunctionType.AGGREGATE);
}
Also used : AggregateFunctionFactory(io.confluent.ksql.function.AggregateFunctionFactory) ImmutableList(com.google.common.collect.ImmutableList) FunctionInfo(io.confluent.ksql.rest.entity.FunctionInfo)

Aggregations

ImmutableList (com.google.common.collect.ImmutableList)1 AggregateFunctionFactory (io.confluent.ksql.function.AggregateFunctionFactory)1 FunctionInfo (io.confluent.ksql.rest.entity.FunctionInfo)1