use of io.confluent.ksql.function.udf.PluggableUdf in project ksql by confluentinc.
the class UdtfLoader method createTableFunction.
private KsqlTableFunction createTableFunction(final Method method, final FunctionName functionName, final ParamType outputType, final List<ParameterInfo> parameters, final String description, final Udtf udtfAnnotation) {
final FunctionInvoker invoker = FunctionLoaderUtils.createFunctionInvoker(method);
final Object instance = FunctionLoaderUtils.instantiateFunctionInstance(method.getDeclaringClass(), description);
final SchemaProvider schemaProviderFunction = FunctionLoaderUtils.handleUdfReturnSchema(method.getDeclaringClass(), outputType, udtfAnnotation.schema(), typeParser, udtfAnnotation.schemaProvider(), functionName.text(), method.isVarArgs());
return new KsqlTableFunction(schemaProviderFunction, functionName, outputType, parameters, description, new PluggableUdf(invoker, instance));
}
Aggregations