Class PythonTypeUtils
java.lang.Object
org.apache.flink.table.runtime.typeutils.PythonTypeUtils
Utilities for converting Flink logical types, such as convert it to the related TypeSerializer or
ProtoType.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe element in the Object Array will be converted to the corresponding Data through element DataConverter.static final classPython Long will be converted to Long in PemJa, so we need ByteDataConverter to convert Java Long to internal Byte.static classData Converter that converts the data to the java format data which can be used in PemJa.static final classPython Float will be converted to Double in PemJa, so we need FloatDataConverter to convert Java Double to internal Float.static final classIdentity data converter.static final classPython Long will be converted to Long in PemJa, so we need IntDataConverter to convert Java Long to internal Integer.static classConverter That convert the logicalType to the related Prototype.static final classThe key/value in the Map will be converted to the corresponding Data through key/value DataConverter.static final classRowData will be converted to the Object Array [RowKind(as Long Object), Field Values(as Object Array)].static final classPython Long will be converted to Long in PemJa, so we need ShortDataConverter to convert Java Long to internal Short.static final classPython datetime.time will be converted to Time in PemJa, so we need TimeDataConverter to convert Java Double to internal Integer. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BigDecimalfromBigDecimal(BigDecimal bigDecimal, int precision, int scale) Convert the specified bigDecimal according to the specified precision and scale.toDataConverter(org.apache.flink.table.types.logical.LogicalType logicalType) static org.apache.flink.api.common.typeutils.TypeSerializertoInternalSerializer(org.apache.flink.table.types.logical.LogicalType logicalType) static FlinkFnApi.Schema.FieldTypetoProtoType(org.apache.flink.table.types.logical.LogicalType logicalType)
-
Constructor Details
-
PythonTypeUtils
public PythonTypeUtils()
-
-
Method Details
-
toProtoType
public static FlinkFnApi.Schema.FieldType toProtoType(org.apache.flink.table.types.logical.LogicalType logicalType) -
toInternalSerializer
public static org.apache.flink.api.common.typeutils.TypeSerializer toInternalSerializer(org.apache.flink.table.types.logical.LogicalType logicalType) -
toDataConverter
public static PythonTypeUtils.DataConverter toDataConverter(org.apache.flink.table.types.logical.LogicalType logicalType) -
fromBigDecimal
Convert the specified bigDecimal according to the specified precision and scale. The specified bigDecimal may be rounded to have the specified scale and then the specified precision is checked. If precision overflow, it will return `null`.Note: The implementation refers to
DecimalData.fromBigDecimal(java.math.BigDecimal, int, int).
-