@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 LogicalType
s will be fully resolved.
Constructor and Description |
---|
LogicalRelDataTypeConverter() |
Modifier and Type | Method and Description |
---|---|
static LogicalType |
toLogicalType(org.apache.calcite.rel.type.RelDataType relDataType,
DataTypeFactory dataTypeFactory) |
static org.apache.calcite.rel.type.RelDataType |
toRelDataType(LogicalType logicalType,
org.apache.calcite.rel.type.RelDataTypeFactory relDataTypeFactory) |
public static org.apache.calcite.rel.type.RelDataType toRelDataType(LogicalType logicalType, org.apache.calcite.rel.type.RelDataTypeFactory relDataTypeFactory)
public static LogicalType toLogicalType(org.apache.calcite.rel.type.RelDataType relDataType, DataTypeFactory dataTypeFactory)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.