@Internal public final class PythonTypeUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PythonTypeUtils.LogicalTypeToConversionClassConverter
Convert LogicalType to conversion class for flink planner.
|
static class |
PythonTypeUtils.LogicalTypeToProtoTypeConverter
Converter That convert the logicalType to the related Prototype.
|
| Constructor and Description |
|---|
PythonTypeUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
dateToInternal(Date date)
Converts the Java type used for UDF parameters of SQL DATE type (
Date) to
internal representation (int). |
static BigDecimal |
fromBigDecimal(BigDecimal bigDecimal,
int precision,
int scale)
Convert the specified bigDecimal according to the specified precision and scale.
|
static org.apache.beam.model.pipeline.v1.RunnerApi.Coder |
getRowCoderProto(org.apache.flink.table.types.logical.RowType rowType,
String coderUrn,
FlinkFnApi.CoderParam.OutputMode outputMode) |
static Date |
internalToDate(int v)
Converts the internal representation of a SQL DATE (int) to the Java type used for UDF
parameters (
Date). |
static Timestamp |
internalToTimestamp(long v)
Converts the internal representation of a SQL TIMESTAMP (long) to the Java type used for UDF
parameters (
Timestamp). |
static long |
timestampToInternal(Timestamp ts)
Converts the Java type used for UDF parameters of SQL TIMESTAMP type (
Timestamp) to internal representation (long). |
static org.apache.flink.api.common.typeutils.TypeSerializer |
toBlinkTypeSerializer(org.apache.flink.table.types.logical.LogicalType logicalType) |
static org.apache.flink.api.common.typeutils.TypeSerializer |
toFlinkTypeSerializer(org.apache.flink.table.types.logical.LogicalType logicalType) |
static FlinkFnApi.Schema.FieldType |
toProtoType(org.apache.flink.table.types.logical.LogicalType logicalType) |
public static org.apache.beam.model.pipeline.v1.RunnerApi.Coder getRowCoderProto(org.apache.flink.table.types.logical.RowType rowType,
String coderUrn,
FlinkFnApi.CoderParam.OutputMode outputMode)
public static FlinkFnApi.Schema.FieldType toProtoType(org.apache.flink.table.types.logical.LogicalType logicalType)
public static org.apache.flink.api.common.typeutils.TypeSerializer toFlinkTypeSerializer(org.apache.flink.table.types.logical.LogicalType logicalType)
public static org.apache.flink.api.common.typeutils.TypeSerializer toBlinkTypeSerializer(org.apache.flink.table.types.logical.LogicalType logicalType)
public static BigDecimal fromBigDecimal(BigDecimal bigDecimal, int precision, int scale)
Note: The implementation refers to DecimalData.fromBigDecimal(java.math.BigDecimal, int, int).
public static Date internalToDate(int v)
Date).
Note: The implementation refers to SqlDateTimeUtils.internalToDate(int).
public static int dateToInternal(Date date)
Date) to
internal representation (int).
Note: The implementation refers to SqlDateTimeUtils.dateToInternal(java.sql.Date).
public static Timestamp internalToTimestamp(long v)
Timestamp).
Note: The implementation refers to SqlDateTimeUtils.internalToTimestamp(long).
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.