SchemaKSourceFactory¶
SchemaKSourceFactory
is used as a factory of source SchemaKStreams (for a DataSource) for DataSourceNode.
Building Source SchemaKStream¶
SchemaKStream<?> buildSource(
PlanBuildContext buildContext,
DataSource dataSource,
QueryContext.Stacker contextStacker)
buildSource
requests the given DataSource whether it is windowed or not and the type.
For KSTREAM
type, buildSource
builds a windowed or regular stream based on whether it is windowed or not, respectively.
For KTABLE
type, buildSource
builds a windowed or regular table based on whether it is windowed or not, respectively.
buildSource
is used when:
DataSourceNode
is requested for a SchemaKStream
SchemaKStream¶
SchemaKStream<?> buildStream(
PlanBuildContext buildContext,
DataSource dataSource,
Stacker contextStacker)
buildStream
creates a new SchemaKStream for a new StreamSource (with pseudoColumnVersionToUse).
Windowed SchemaKStream¶
SchemaKStream<?> buildWindowedStream(
PlanBuildContext buildContext,
DataSource dataSource,
Stacker contextStacker)
buildWindowedStream
...FIXME
SchemaKTable¶
SchemaKTable<?> buildTable(
PlanBuildContext buildContext,
DataSource dataSource,
Stacker contextStacker)
buildTable
requests the given DataSource for the KeyFormat (through the KsqlTopic).
buildTable
determinePseudoColumnVersionToUse.
buildTable
creates a TableSource (or legacy TableSourceV1 based on whether ksql.rowpartition.rowoffset.enabled is enabled or not, respectively).
In the end, buildTable
resolves the schema and creates a SchemaKTable (for the TableSource of KTableHolder
of GenericKey
s).
Creating SchemaKStream¶
SchemaKStream<K> schemaKStream(
PlanBuildContext buildContext,
LogicalSchema schema,
KeyFormat keyFormat,
SourceStep<KStreamHolder<K>> streamSource)
schemaKStream
creates a SchemaKStream.
schemaKStream
is used when:
SchemaKSourceFactory
is requested for a windowed and non-windowed SchemaKStream
determinePseudoColumnVersionToUse¶
int determinePseudoColumnVersionToUse(
PlanBuildContext buildContext)
determinePseudoColumnVersionToUse
...FIXME
determinePseudoColumnVersionToUse
is used when:
SchemaKSourceFactory
is requested to build a source SchemaKStream (buildWindowedStream, buildStream, buildWindowedTable, buildTable)
Creating SchemaKTable¶
<K> SchemaKTable<K> schemaKTable(
PlanBuildContext buildContext,
LogicalSchema schema,
KeyFormat keyFormat,
SourceStep<KTableHolder<K>> tableSource)
schemaKTable
creates a SchemaKTable.
schemaKTable
is used when:
SchemaKSourceFactory
is requested to build a windowed or non-windowed table
Resolving LogicalSchema (of ExecutionStep)¶
LogicalSchema resolveSchema(
PlanBuildContext buildContext,
ExecutionStep<?> step,
DataSource dataSource)
resolveSchema
creates a StepSchemaResolver (for the given PlanBuildContext
) to resolve the LogicalSchema (from the given DataSource) of the given ExecutionStep.