Skip to content

KsqlPlan

KsqlPlan is an abstraction of query plans.

Contract

getDdlCommand

Optional<DdlCommand> getDdlCommand()

DdlCommand

Used when:

  • EngineExecutor is requested to execute a query
  • DefaultSchemaInjector is requested to forCreateAsStatement
  • SchemaRegisterInjector is requested to registerForCreateAs
  • RestoreCommandsCompactor is requested to compact
  • RestoreCommandsCompactor.CompactedNode is requested to maybeAppend

getPersistentQueryType

Optional<KsqlConstants.PersistentQueryType> getPersistentQueryType()

PersistentQueryType that can be one of the following:

  • CREATE_SOURCE
  • CREATE_AS
  • INSERT

Used when:

getQueryPlan

Optional<QueryPlan> getQueryPlan()

QueryPlan

Used when:

  • EngineExecutor is requested to execute a query
  • RestoreCommandsCompactor.CompactedNode is requested to maybeAppend

getStatementText

String getStatementText()

Statement (in text format)

Used when:

withoutQuery

KsqlPlan withoutQuery()

Used when:

  • RestoreCommandsCompactor is requested to compact

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:

Creating KsqlPlan for QueryPlan (queryPlanCurrent)

KsqlPlan queryPlanCurrent(
  String statementText,
  Optional<DdlCommand> ddlCommand,
  QueryPlan queryPlan)

queryPlanCurrent creates a KsqlPlanV1.

queryPlanCurrent is used when:

Back to top