@Internal public final class DynamicSinkUtils extends Object
DynamicTableSink.| Modifier and Type | Method and Description |
|---|---|
static org.apache.calcite.rel.RelNode |
toRel(org.apache.flink.table.planner.calcite.FlinkRelBuilder relBuilder,
org.apache.calcite.rel.RelNode input,
org.apache.flink.table.operations.CatalogSinkModifyOperation sinkOperation,
org.apache.flink.table.connector.sink.DynamicTableSink sink,
org.apache.flink.table.catalog.CatalogTable table)
Similar to
CatalogSourceTable.toRel(RelOptTable.ToRelContext), converts a given
DynamicTableSink to a RelNode. |
static org.apache.calcite.rel.RelNode |
validateSchemaAndApplyImplicitCast(org.apache.calcite.rel.RelNode query,
org.apache.flink.table.api.TableSchema sinkSchema,
org.apache.flink.table.catalog.ObjectIdentifier sinkIdentifier,
org.apache.flink.table.planner.calcite.FlinkTypeFactory typeFactory)
Checks if the given query can be written into the given sink's table schema.
|
public static org.apache.calcite.rel.RelNode toRel(org.apache.flink.table.planner.calcite.FlinkRelBuilder relBuilder,
org.apache.calcite.rel.RelNode input,
org.apache.flink.table.operations.CatalogSinkModifyOperation sinkOperation,
org.apache.flink.table.connector.sink.DynamicTableSink sink,
org.apache.flink.table.catalog.CatalogTable table)
CatalogSourceTable.toRel(RelOptTable.ToRelContext), converts a given
DynamicTableSink to a RelNode. It adds helper projections if necessary.public static org.apache.calcite.rel.RelNode validateSchemaAndApplyImplicitCast(org.apache.calcite.rel.RelNode query,
org.apache.flink.table.api.TableSchema sinkSchema,
@Nullable
org.apache.flink.table.catalog.ObjectIdentifier sinkIdentifier,
org.apache.flink.table.planner.calcite.FlinkTypeFactory typeFactory)
It checks whether field types are compatible (types should be equal including precisions). If types are not compatible, but can be implicitly cast, a cast projection will be applied. Otherwise, an exception will be thrown.
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.