use of io.confluent.ksql.parser.tree.DescribeFunction in project ksql by confluentinc.
the class DescribeFunctionExecutor method execute.
public static StatementExecutorResponse execute(final ConfiguredStatement<DescribeFunction> statement, final SessionProperties sessionProperties, final KsqlExecutionContext executionContext, final ServiceContext serviceContext) {
final DescribeFunction describeFunction = statement.getStatement();
final FunctionName functionName = FunctionName.of(describeFunction.getFunctionName());
if (executionContext.getMetaStore().isAggregate(functionName)) {
return StatementExecutorResponse.handled(Optional.of(describeAggregateFunction(executionContext, functionName, statement.getStatementText())));
}
if (executionContext.getMetaStore().isTableFunction(functionName)) {
return StatementExecutorResponse.handled(Optional.of(describeTableFunction(executionContext, functionName, statement.getStatementText())));
}
return StatementExecutorResponse.handled(Optional.of(describeNonAggregateFunction(executionContext, functionName, statement.getStatementText())));
}
Aggregations