Search in sources :

Example 1 with TableFunctionFactory

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

the class DescribeFunctionExecutor method describeTableFunction.

private static FunctionDescriptionList describeTableFunction(final KsqlExecutionContext executionContext, final FunctionName functionName, final String statementText) {
    final TableFunctionFactory tableFunctionFactory = executionContext.getMetaStore().getTableFunctionFactory(functionName);
    final ImmutableList.Builder<FunctionInfo> listBuilder = ImmutableList.builder();
    tableFunctionFactory.eachFunction(func -> listBuilder.add(getFunctionInfo(func.parameterInfo(), func.declaredReturnType(), func.getDescription(), func.isVariadic())));
    return createFunctionDescriptionList(statementText, tableFunctionFactory.getMetadata(), listBuilder.build(), FunctionType.TABLE);
}
Also used : TableFunctionFactory(io.confluent.ksql.function.TableFunctionFactory) ImmutableList(com.google.common.collect.ImmutableList) FunctionInfo(io.confluent.ksql.rest.entity.FunctionInfo)

Aggregations

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