Skip to content

PlanNode

PlanNode is an abstraction of nodes of a query plan.

Contract

Building SchemaKStream

SchemaKStream<?> buildStream(
  PlanBuildContext buildContext)

Builds a SchemaKStream

Used when:

  • ExecutionPlanBuilder is requested for a PhysicalPlan
  • others (less important?)

Number of Partitions

int getPartitions(
  KafkaTopicClient kafkaTopicClient)

LogicalSchema

LogicalSchema getSchema()

Source PlanNodes

List<PlanNode> getSources()

Source PlanNodes:

Used when:

Implementations

Creating Instance

PlanNode takes the following to be created:

Abstract Class

PlanNode is an abstract class and cannot be created directly. It is created indirectly for the concrete PlanNodes.

DataSourceType

PlanNode is given a DataSourceType when created.

DataSourceType ksqlType
KSTREAM STREAM
KTABLE TABLE

getSourceNodes

Stream<DataSourceNode> getSourceNodes()

For this PlanNode as DataSourceNode, getSourceNodes simply returns this DataSourceNode.

Otherwise, getSourceNodes takes the source PlanNodes and then their DataSourceNodes.


getSourceNodes is used when: