public class Decimal extends Object
Modifier and Type | Method and Description |
---|---|
int |
getPrecision() |
static Pair<Integer,Integer> |
getPrecisionAndScale(String type)
Returns the decimal's precision and scale from the type definition.
|
int |
getScale() |
BigDecimal |
toBigDecimal(String v) |
byte[] |
toParquetBytes(String v) |
public Decimal(String type)
type
- the type definition, like "decimal(10, 2)"public int getPrecision()
public int getScale()
public static Pair<Integer,Integer> getPrecisionAndScale(String type)
type
- the type definition, like "decimal(10, 2)"public BigDecimal toBigDecimal(String v)
v
- the string valuepublic byte[] toParquetBytes(String v)
v
- the string valueCopyright © 2023. All Rights Reserved.