Class BigDecimalTypeInfo
- java.lang.Object
-
- org.apache.flink.api.common.typeinfo.TypeInformation<T>
-
- org.apache.flink.api.common.typeinfo.BasicTypeInfo<BigDecimal>
-
- org.apache.flink.table.runtime.typeutils.BigDecimalTypeInfo
-
- All Implemented Interfaces:
Serializable
,AtomicType<BigDecimal>
public class BigDecimalTypeInfo extends BasicTypeInfo<BigDecimal>
TypeInformation
forBigDecimal
.It differs from
BasicTypeInfo.BIG_DEC_TYPE_INFO
in that: This type includes `precision` and `scale`, similar to SQL DECIMAL.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.flink.api.common.typeinfo.BasicTypeInfo
BIG_DEC_TYPE_INFO, BIG_INT_TYPE_INFO, BOOLEAN_TYPE_INFO, BYTE_TYPE_INFO, CHAR_TYPE_INFO, DATE_TYPE_INFO, DOUBLE_TYPE_INFO, FLOAT_TYPE_INFO, INSTANT_TYPE_INFO, INT_TYPE_INFO, LONG_TYPE_INFO, SHORT_TYPE_INFO, STRING_TYPE_INFO, VOID_TYPE_INFO
-
-
Constructor Summary
Constructors Constructor Description BigDecimalTypeInfo(int precision, int scale)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
int
hashCode()
static BigDecimalTypeInfo
of(int precision, int scale)
static BigDecimalTypeInfo
of(BigDecimal value)
int
precision()
int
scale()
boolean
shouldAutocastTo(BasicTypeInfo<?> to)
Returns whether this type should be automatically casted to the target type in an arithmetic operation.String
toString()
-
Methods inherited from class org.apache.flink.api.common.typeinfo.BasicTypeInfo
canEqual, createComparator, createSerializer, getArity, getInfoFor, getTotalFields, getTypeClass, isBasicType, isKeyType, isTupleType
-
Methods inherited from class org.apache.flink.api.common.typeinfo.TypeInformation
getGenericParameters, isSortKeyType, of, of
-
-
-
-
Method Detail
-
of
public static BigDecimalTypeInfo of(int precision, int scale)
-
of
public static BigDecimalTypeInfo of(BigDecimal value)
-
toString
public String toString()
- Overrides:
toString
in classBasicTypeInfo<BigDecimal>
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classBasicTypeInfo<BigDecimal>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classBasicTypeInfo<BigDecimal>
-
shouldAutocastTo
public boolean shouldAutocastTo(BasicTypeInfo<?> to)
Description copied from class:BasicTypeInfo
Returns whether this type should be automatically casted to the target type in an arithmetic operation.- Overrides:
shouldAutocastTo
in classBasicTypeInfo<BigDecimal>
-
precision
public int precision()
-
scale
public int scale()
-
-