@Internal public final class LogicalRelDataTypeConverter extends Object
LogicalType and RelDataType.
This converter has many similarities with FlinkTypeFactory and might also replace it
at some point. However, for now it is more consistent and does not lose information (i.e. for
TIME(9) or interval types). It still delegates to RelDataTypeFactory but only for
predefined/basic types.
Note: The conversion to LogicalType is not 100% symmetric and is currently optimized
for expressions. Information about the StructKind of a RelRecordType is always
set to StructKind.PEEK_FIELDS_NO_EXPAND. Missing precision and scale will be filled with
Flink's default values such that all resulting LogicalTypes will be fully resolved.
| Constructor and Description |
|---|
LogicalRelDataTypeConverter() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.flink.table.types.logical.LogicalType |
toLogicalType(org.apache.calcite.rel.type.RelDataType relDataType,
org.apache.flink.table.catalog.DataTypeFactory dataTypeFactory) |
static org.apache.calcite.rel.type.RelDataType |
toRelDataType(org.apache.flink.table.types.logical.LogicalType logicalType,
org.apache.calcite.rel.type.RelDataTypeFactory relDataTypeFactory) |
public static org.apache.calcite.rel.type.RelDataType toRelDataType(org.apache.flink.table.types.logical.LogicalType logicalType,
org.apache.calcite.rel.type.RelDataTypeFactory relDataTypeFactory)
public static org.apache.flink.table.types.logical.LogicalType toLogicalType(org.apache.calcite.rel.type.RelDataType relDataType,
org.apache.flink.table.catalog.DataTypeFactory dataTypeFactory)
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.