Skip to content

DataSourceNode

DataSourceNode is a PlanNode.

Creating Instance

DataSourceNode takes the following to be created:

DataSourceNode is created when:

  • LogicalPlanner is requested to build a join or a non-join plan node

SchemaKStreamFactory

DataSourceNode can be given a SchemaKStreamFactory when created. Unless given, DataSourceNode uses SchemaKSourceFactory.

Note

Note the difference in type names, i.e. SchemaKStreamFactory (with Stream inside) vs SchemaKSourceFactory (with Source instead).

The SchemaKStreamFactory is used to create a source SchemaKStream when DataSourceNode is requested for one.

Building SchemaKStream

SchemaKStream<?> buildStream(
  PlanBuildContext buildContext)

buildStream is part of the PlanNode abstraction.


buildStream requests the given PlanBuildContext to buildNodeContext for the PlanNodeId.

In the end, buildStream requests the SchemaKStreamFactory for a SchemaKStream for the DataSource.