Package io.delta.kernel.types
Class DecimalType
Object
io.delta.kernel.types.DataType
io.delta.kernel.types.DecimalType
The data type representing
java.math.BigDecimal values. A Decimal that must have fixed
precision (the maximum number of digits) and scale (the number of digits on right side of dot).
The precision can be up to 38, scale can also be up to 38 (less or equal to precision).
The default precision and scale is (10, 0).
- Since:
- 3.0.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.delta.kernel.types.DataType
equivalent, isTypeValueBinaryLike, isWriteCompatible
-
Field Details
-
USER_DEFAULT
-
-
Constructor Details
-
DecimalType
public DecimalType(int precision, int scale)
-
-
Method Details
-
getPrecision
public int getPrecision()- Returns:
- the maximum number of digits of the decimal
-
getScale
public int getScale()- Returns:
- the number of digits on the right side of the decimal point (dot)
-
isNested
public boolean isNested()Description copied from class:DataTypeReturns true iff this data is a nested data type (it logically parameterized by other types).For example StructType, ArrayType, MapType are nested data types.
-
toString
-
equals
-
hashCode
public int hashCode()
-