@Internal public class RexLiteralUtil extends Object
RexLiteral.| Modifier and Type | Method and Description |
|---|---|
static Object |
toFlinkInternalValue(Comparable<?> value,
org.apache.flink.table.types.logical.LogicalType valueType)
Convert a value from Calcite's
Comparable data structures to Flink internal data
structures and also tries to be a bit flexible by accepting usual Java types such as String
and boxed numerics. |
static org.apache.flink.api.java.tuple.Tuple2<Object,org.apache.flink.table.types.logical.LogicalType> |
toFlinkInternalValue(RexLiteral literal)
|
public static org.apache.flink.api.java.tuple.Tuple2<Object,org.apache.flink.table.types.logical.LogicalType> toFlinkInternalValue(RexLiteral literal)
public static Object toFlinkInternalValue(Comparable<?> value, org.apache.flink.table.types.logical.LogicalType valueType)
Comparable data structures to Flink internal data
structures and also tries to be a bit flexible by accepting usual Java types such as String
and boxed numerics.
In case of symbol types, this function will return provided value, checking that it's an
Enum.
This function is essentially like FlinkTypeFactory.toLogicalType(RelDataType) but
for values.
Check RexLiteral.valueMatchesType(Comparable, SqlTypeName, boolean) for details on
the Comparable data structures and RowData for
details on Flink's internal data structures.
value - the value in Calcite's Comparable data structuresvalueType - the type of the valueIllegalArgumentException - in case the class of value does not match the expectations
of valueTypeCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.