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
-
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)
-
toJson
Description copied from class:DataTypeConvert the data type to Delta protocol specified serialization format. -
toString
-
equals
-
hashCode
public int hashCode()
-