KsqlPlan¶
KsqlPlan is an abstraction of query plans.
Contract¶
getDdlCommand¶
Optional<DdlCommand> getDdlCommand()
Used when:
EngineExecutoris requested to execute a queryDefaultSchemaInjectoris requested toforCreateAsStatementSchemaRegisterInjectoris requested to registerForCreateAsRestoreCommandsCompactoris requested tocompactRestoreCommandsCompactor.CompactedNodeis requested tomaybeAppend
getPersistentQueryType¶
Optional<KsqlConstants.PersistentQueryType> getPersistentQueryType()
PersistentQueryType that can be one of the following:
CREATE_SOURCECREATE_ASINSERT
Used when:
EngineExecutoris requested to execute a query
getQueryPlan¶
Optional<QueryPlan> getQueryPlan()
Used when:
EngineExecutoris requested to execute a queryRestoreCommandsCompactor.CompactedNodeis requested tomaybeAppend
getStatementText¶
String getStatementText()
Statement (in text format)
Used when:
EngineExecutoris requested to execute a queryKsqlEngineis requested to execute a statementCommandutility is used to create a Command
withoutQuery¶
KsqlPlan withoutQuery()
Used when:
RestoreCommandsCompactoris 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:
EngineExecutoris 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:
EngineExecutoris requested to plan an ExecutableDdlStatement (with a source table) and plan a QueryContainer