Skip to content

StatementExecutor

StatementExecutor is a private static final class of StandaloneExecutor with statement handlers.

Creating Instance

StatementExecutor takes the following to be created:

StatementExecutor is created when:

Statement Handlers

StatementExecutor creates HANDLERS collection of handlers (functions) of Statements.

SQL Statement Class Handler
SET SetProperty StatementExecutor::handleSetProperty
UNSET UnsetProperty StatementExecutor::handleUnsetProperty
CREATE STREAM CreateStream StatementExecutor::handleExecutableDdl
CREATE TABLE CreateTable StatementExecutor::handleExecutableDdl
REGISTER TYPE RegisterType StatementExecutor::handleExecutableDdl
CREATE STREAM AS SELECT CreateStreamAsSelect handlePersistentQuery
CREATE TABLE AS SELECT CreateTableAsSelect handlePersistentQuery
INSERT INTO InsertInto handlePersistentQuery

The HANDLERS is used in execute and generateSupportedMessage.

handlePersistentQuery

void handlePersistentQuery(
  ConfiguredStatement<?> statement)

handlePersistentQuery requests the KsqlExecutionContext to execute the given statement (in the ServiceContext) to produce a QueryMetadata.

handlePersistentQuery makes sure that the QueryMetadata is a PersistentQueryMetadata or throws a KsqlStatementException:

Could not build the query

handlePersistentQuery is used when:

Back to top