LogicalSchema¶
LogicalSchema
represents a logical schema of a StructuredDataSource.
LogicalSchema
is made up of columns.
Creating Instance¶
LogicalSchema
takes the following to be created:
LogicalSchema
is created when:
LogicalSchema
is requested to withKeyColsOnly, rebuildWithPseudoAndKeyColsInValue, rebuildWithoutPseudoAndKeyColsInValue, rebuildWithPseudoColumnsToMaterializeLogicalSchema.Builder
is requested to build a LogicalSchema
Columns¶
LogicalSchema
is given Columns when created.
Used when:
Key Schema¶
List<Column> key()
key
groups columns by namespace and takes out the Columns in KEY namespace.
Value Schema¶
List<Column> value()
value
groups columns by namespace and takes out the Columns in VALUE namespace.
Header Columns¶
List<Column> headers()
headers
groups columns by namespace and takes out the Columns in HEADERS namespace.
headers
is used when:
LogicalSchema
is requested to rebuildWithPseudoColumnsToMaterializeAstSanitizer.RewriterPlugin
is requested to validate INSERT INTO statement (to assert that the target datasource has no header columns)QueryProjectNode
is requested to buildPullQuerySelectStarSchemaDistributingExecutor
is requested to validate INSERT INTO statement (to assert that the target datasource has no header columns)InsertValuesExecutor
is requested to validate INSERT VALUES statement (to assert that the target datasource has no header columns)SourceBuilder
is requested to build a KTableSourceBuilderV1
is requested to build a KTable and a KStream
byNamespace¶
Map<Namespace, List<Column>> byNamespace()
byNamespace
...FIXME
byNamespace
is used when:
LogicalSchema
is requested to key, value, headers, withKeyColsOnly, rebuildWithPseudoAndKeyColsInValue, rebuildWithoutPseudoAndKeyColsInValue, rebuildWithPseudoColumnsToMaterialize
findColumnMatching¶
Optional<Column> findColumnMatching(
Predicate<Column> predicate)
findColumnMatching
...FIXME
findColumnMatching
is used when:
LogicalSchema
is requested to findColumn, findValueColumn, isKeyColumn, isHeaderColumn, nonPseudoHeaderAndKeyColsAsValueCols