Class PythonTypeUtils
- java.lang.Object
-
- org.apache.flink.table.runtime.typeutils.PythonTypeUtils
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PythonTypeUtils.ArrayDataConverter<T>
The element in the Object Array will be converted to the corresponding Data through element DataConverter.static class
PythonTypeUtils.ByteDataConverter
Python Long will be converted to Long in PemJa, so we need ByteDataConverter to convert Java Long to internal Byte.static class
PythonTypeUtils.DataConverter<IN,INTER,OUT>
Data Converter that converts the data to the java format data which can be used in PemJa.static class
PythonTypeUtils.FloatDataConverter
Python Float will be converted to Double in PemJa, so we need FloatDataConverter to convert Java Double to internal Float.static class
PythonTypeUtils.IdentityDataConverter<IN,OUT>
Identity data converter.static class
PythonTypeUtils.IntDataConverter
Python Long will be converted to Long in PemJa, so we need IntDataConverter to convert Java Long to internal Integer.static class
PythonTypeUtils.LogicalTypeToProtoTypeConverter
Converter That convert the logicalType to the related Prototype.static class
PythonTypeUtils.MapDataConverter
The key/value in the Map will be converted to the corresponding Data through key/value DataConverter.static class
PythonTypeUtils.RowDataConverter
RowData will be converted to the Object Array [RowKind(as Long Object), Field Values(as Object Array)].static class
PythonTypeUtils.ShortDataConverter
Python Long will be converted to Long in PemJa, so we need ShortDataConverter to convert Java Long to internal Short.static class
PythonTypeUtils.TimeDataConverter
Python datetime.time will be converted to Time in PemJa, so we need TimeDataConverter to convert Java Double to internal Integer.
-
Constructor Summary
Constructors Constructor Description PythonTypeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BigDecimal
fromBigDecimal(BigDecimal bigDecimal, int precision, int scale)
Convert the specified bigDecimal according to the specified precision and scale.static PythonTypeUtils.DataConverter
toDataConverter(LogicalType logicalType)
static TypeSerializer
toInternalSerializer(LogicalType logicalType)
static FlinkFnApi.Schema.FieldType
toProtoType(LogicalType logicalType)
-
-
-
Method Detail
-
toProtoType
public static FlinkFnApi.Schema.FieldType toProtoType(LogicalType logicalType)
-
toInternalSerializer
public static TypeSerializer toInternalSerializer(LogicalType logicalType)
-
toDataConverter
public static PythonTypeUtils.DataConverter toDataConverter(LogicalType logicalType)
-
fromBigDecimal
public static BigDecimal fromBigDecimal(BigDecimal bigDecimal, int precision, int scale)
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)
.
-
-