KsqlPlan¶
KsqlPlan
is an abstraction of query plans.
Contract¶
getDdlCommand¶
Optional<DdlCommand> getDdlCommand()
Used when:
EngineExecutor
is requested to execute a queryDefaultSchemaInjector
is requested toforCreateAsStatement
SchemaRegisterInjector
is requested to registerForCreateAsRestoreCommandsCompactor
is requested tocompact
RestoreCommandsCompactor.CompactedNode
is requested tomaybeAppend
getPersistentQueryType¶
Optional<KsqlConstants.PersistentQueryType> getPersistentQueryType()
PersistentQueryType
that can be one of the following:
CREATE_SOURCE
CREATE_AS
INSERT
Used when:
EngineExecutor
is requested to execute a query
getQueryPlan¶
Optional<QueryPlan> getQueryPlan()
Used when:
EngineExecutor
is requested to execute a queryRestoreCommandsCompactor.CompactedNode
is requested tomaybeAppend
getStatementText¶
String getStatementText()
Statement (in text format)
Used when:
EngineExecutor
is requested to execute a queryKsqlEngine
is requested to execute a statementCommand
utility is used to create a Command
withoutQuery¶
KsqlPlan withoutQuery()
Used when:
RestoreCommandsCompactor
is requested tocompact
Implementations¶
Creating KsqlPlan for DdlCommand (ddlPlanCurrent)¶
KsqlPlan ddlPlanCurrent(
String statementText,
DdlCommand ddlCommand)
ddlPlanCurrent
creates a KsqlPlanV1 with the given statementText
and the DdlCommand.
ddlPlanCurrent
is used when:
EngineExecutor
is requested to plan an ExecutableDdlStatement (for a non-source table)
Creating KsqlPlan for QueryPlan (queryPlanCurrent)¶
KsqlPlan queryPlanCurrent(
String statementText,
Optional<DdlCommand> ddlCommand,
QueryPlan queryPlan)
queryPlanCurrent
creates a KsqlPlanV1.
queryPlanCurrent
is used when:
EngineExecutor
is requested to plan an ExecutableDdlStatement (with a source table) and plan a QueryContainer