use of io.confluent.ksql.parser.tree.CreateTableAsSelect in project ksql by confluentinc.
the class StatementExecutor method handleCreateAsSelect.
private String handleCreateAsSelect(final CreateAsSelect statement, final Command command, final CommandId commandId, final Map<QueryId, CommandId> terminatedQueries, final String statementStr, final boolean wasDropped) throws Exception {
QuerySpecification querySpecification = (QuerySpecification) statement.getQuery().getQueryBody();
Query query = ksqlEngine.addInto(statement.getQuery(), querySpecification, statement.getName().getSuffix(), statement.getProperties(), statement.getPartitionByColumn());
if (startQuery(statementStr, query, commandId, terminatedQueries, command, wasDropped)) {
return statement instanceof CreateTableAsSelect ? "Table created and running" : "Stream created and running";
}
return null;
}
Aggregations