@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,
CatalogSinkModifyOperation sinkOperation,
DynamicTableSink sink,
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,
TableSchema sinkSchema,
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, CatalogSinkModifyOperation sinkOperation, DynamicTableSink sink, 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, TableSchema sinkSchema, @Nullable 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.