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:
LogicalSchemais requested to withKeyColsOnly, rebuildWithPseudoAndKeyColsInValue, rebuildWithoutPseudoAndKeyColsInValue, rebuildWithPseudoColumnsToMaterializeLogicalSchema.Builderis 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:
LogicalSchemais requested to rebuildWithPseudoColumnsToMaterializeAstSanitizer.RewriterPluginis requested to validate INSERT INTO statement (to assert that the target datasource has no header columns)QueryProjectNodeis requested to buildPullQuerySelectStarSchemaDistributingExecutoris requested to validate INSERT INTO statement (to assert that the target datasource has no header columns)InsertValuesExecutoris requested to validate INSERT VALUES statement (to assert that the target datasource has no header columns)SourceBuilderis requested to build a KTableSourceBuilderV1is requested to build a KTable and a KStream
byNamespace¶
Map<Namespace, List<Column>> byNamespace()
byNamespace...FIXME
byNamespace is used when:
LogicalSchemais requested to key, value, headers, withKeyColsOnly, rebuildWithPseudoAndKeyColsInValue, rebuildWithoutPseudoAndKeyColsInValue, rebuildWithPseudoColumnsToMaterialize
findColumnMatching¶
Optional<Column> findColumnMatching(
Predicate<Column> predicate)
findColumnMatching...FIXME
findColumnMatching is used when:
LogicalSchemais requested to findColumn, findValueColumn, isKeyColumn, isHeaderColumn, nonPseudoHeaderAndKeyColsAsValueCols