use of io.confluent.ksql.metastore.model.KsqlTable in project ksql by confluentinc.
the class ListSourceExecutor method tables.
public static StatementExecutorResponse tables(final ConfiguredStatement<ListTables> statement, final SessionProperties sessionProperties, final KsqlExecutionContext executionContext, final ServiceContext serviceContext) {
final List<KsqlTable<?>> ksqlTables = getSpecificTables(executionContext);
final ListTables listTables = statement.getStatement();
if (listTables.getShowExtended()) {
return StatementExecutorResponse.handled(sourceDescriptionList(statement, sessionProperties, executionContext, serviceContext, ksqlTables, listTables.getShowExtended()));
}
return StatementExecutorResponse.handled(Optional.of(new TablesList(statement.getStatementText(), ksqlTables.stream().map(ListSourceExecutor::sourceTable).collect(Collectors.toList()))));
}
Aggregations