| Package | Description |
|---|---|
| org.apache.hadoop.hive.common.type |
| Modifier and Type | Field and Description |
|---|---|
static int |
HiveDecimalV1.MAX_PRECISION |
static int |
HiveDecimal.MAX_PRECISION |
static int |
HiveDecimalV1.MAX_SCALE |
static int |
HiveDecimal.MAX_SCALE |
static HiveDecimalV1 |
HiveDecimalV1.ONE |
static HiveDecimal |
HiveDecimal.ONE |
static int |
HiveDecimalV1.ROUND_CEILING |
static int |
HiveDecimal.ROUND_CEILING
ROUND_CEILING:
|
static int |
HiveDecimalV1.ROUND_FLOOR |
static int |
HiveDecimal.ROUND_FLOOR
ROUND_FLOOR:
|
static int |
HiveDecimalV1.ROUND_HALF_EVEN |
static int |
HiveDecimal.ROUND_HALF_EVEN
ROUND_HALF_EVEN:
Round towards the "nearest neighbor" unless both neighbors are equidistant, then round
towards the even neighbor.
|
static int |
HiveDecimalV1.ROUND_HALF_UP |
static int |
HiveDecimal.ROUND_HALF_UP
ROUND_HALF_UP:
|
static int |
HiveDecimalV1.SYSTEM_DEFAULT_PRECISION
Default precision/scale when system is not able to determine them, such as in case
of a non-generic udf.
|
static int |
HiveDecimal.SYSTEM_DEFAULT_PRECISION
Default precision/scale when system is not able to determine them, such as in case
of a non-generic udf.
|
static int |
HiveDecimalV1.SYSTEM_DEFAULT_SCALE |
static int |
HiveDecimal.SYSTEM_DEFAULT_SCALE |
static int |
HiveDecimalV1.USER_DEFAULT_PRECISION
Default precision/scale when user doesn't specify in the column metadata, such as
decimal and decimal(8).
|
static int |
HiveDecimal.USER_DEFAULT_PRECISION
Default precision/scale when user doesn't specify in the column metadata, such as
decimal and decimal(8).
|
static int |
HiveDecimalV1.USER_DEFAULT_SCALE |
static int |
HiveDecimal.USER_DEFAULT_SCALE |
static HiveDecimalV1 |
HiveDecimalV1.ZERO |
static HiveDecimal |
HiveDecimal.ZERO
Common values.
|
| Modifier and Type | Method and Description |
|---|---|
HiveDecimalV1 |
HiveDecimalV1.abs() |
HiveDecimal |
HiveDecimal.abs()
Take the absolute value of a decimal.
|
HiveDecimal |
HiveDecimal.add(HiveDecimal dec)
Add the current decimal and another decimal and return the result.
|
HiveDecimalV1 |
HiveDecimalV1.add(HiveDecimalV1 dec) |
BigDecimal |
HiveDecimalV1.bigDecimalValue() |
BigDecimal |
HiveDecimal.bigDecimalValue()
Return a BigDecimal representing the decimal.
|
byte |
HiveDecimalV1.byteValue() |
byte |
HiveDecimal.byteValue()
A byte variation of longValue()
|
int |
HiveDecimal.compareTo(HiveDecimal dec) |
int |
HiveDecimalV1.compareTo(HiveDecimalV1 dec) |
static HiveDecimalV1 |
HiveDecimalV1.create(BigDecimal b) |
static HiveDecimal |
HiveDecimal.create(BigDecimal bigDecimal)
Create a HiveDecimal from BigDecimal object.
|
static HiveDecimalV1 |
HiveDecimalV1.create(BigDecimal b,
boolean allowRounding) |
static HiveDecimal |
HiveDecimal.create(BigDecimal bigDecimal,
boolean allowRounding)
Same as the above create method, except fractional digit rounding can be turned off.
|
static HiveDecimalV1 |
HiveDecimalV1.create(BigInteger bi) |
static HiveDecimal |
HiveDecimal.create(BigInteger bigInteger)
Creates a HiveDecimal from a BigInteger's value with a scale of 0.
|
static HiveDecimalV1 |
HiveDecimalV1.create(BigInteger unscaled,
int scale) |
static HiveDecimal |
HiveDecimal.create(BigInteger bigInteger,
int scale)
Creates a HiveDecimal from a BigInteger's value with a specified scale.
|
static HiveDecimalV1 |
HiveDecimalV1.create(int i) |
static HiveDecimal |
HiveDecimal.create(int intValue)
Create a HiveDecimal object from an int.
|
static HiveDecimalV1 |
HiveDecimalV1.create(long l) |
static HiveDecimal |
HiveDecimal.create(long longValue)
Create a HiveDecimal object from a long.
|
static HiveDecimalV1 |
HiveDecimalV1.create(String dec) |
static HiveDecimal |
HiveDecimal.create(String string)
Create a HiveDecimal by parsing a whole string.
|
HiveDecimal |
HiveDecimal.divide(HiveDecimal divisor)
Divides this decimal by another decimal and returns a new decimal with the result.
|
HiveDecimalV1 |
HiveDecimalV1.divide(HiveDecimalV1 dec) |
double |
HiveDecimalV1.doubleValue() |
double |
HiveDecimal.doubleValue()
Return a double representing the decimal.
|
static HiveDecimal |
HiveDecimal.enforcePrecisionScale(HiveDecimal dec,
int maxPrecision,
int maxScale)
Determine if a decimal fits within a specified maxPrecision and maxScale, and round
off fractional digits if necessary to make the decimal fit.
|
static HiveDecimalV1 |
HiveDecimalV1.enforcePrecisionScale(HiveDecimalV1 dec,
int maxPrecision,
int maxScale) |
boolean |
HiveDecimalV1.equals(Object obj) |
boolean |
HiveDecimal.equals(Object obj)
Are two decimal content (values) equal?
|
float |
HiveDecimalV1.floatValue() |
float |
HiveDecimal.floatValue()
Return a float representing the decimal.
|
int |
HiveDecimalV1.hashCode() |
int |
HiveDecimal.hashCode()
This is returns original hash code as returned by HiveDecimalV1.
|
int |
HiveDecimalV1.intValue()
Note - this method will corrupt the value if it doesn't fit.
|
int |
HiveDecimal.intValue()
An int variation of longValue().
|
long |
HiveDecimalV1.longValue()
Note - this method will corrupt the value if it doesn't fit.
|
long |
HiveDecimal.longValue()
Return the long value of a decimal.
|
long |
HiveDecimalV1.longValueExact() |
long |
HiveDecimal.longValueExact() |
HiveDecimal |
HiveDecimal.multiply(HiveDecimal dec)
Multiply two decimals.
|
HiveDecimalV1 |
HiveDecimalV1.multiply(HiveDecimalV1 dec) |
HiveDecimalV1 |
HiveDecimalV1.negate() |
HiveDecimal |
HiveDecimal.negate()
Reverse the sign of a decimal.
|
HiveDecimalV1 |
HiveDecimalV1.pow(int n) |
HiveDecimal |
HiveDecimal.pow(int exponent)
Return the result of decimal^exponent
|
int |
HiveDecimalV1.precision()
Returns the number of digits (integer and fractional) in the number, which is equivalent
to SQL decimal precision.
|
int |
HiveDecimal.precision()
Returns the number of digits (integer and fractional) in the number, which is equivalent
to SQL decimal precision.
|
HiveDecimal |
HiveDecimal.remainder(HiveDecimal divisor)
Divides this decimal by another decimal and returns a new decimal with the remainder of the
division.
|
HiveDecimalV1 |
HiveDecimalV1.remainder(HiveDecimalV1 dec) |
int |
HiveDecimalV1.scale() |
int |
HiveDecimal.scale()
Returns the scale of the decimal.
|
HiveDecimalV1 |
HiveDecimalV1.scaleByPowerOfTen(int n) |
HiveDecimal |
HiveDecimal.scaleByPowerOfTen(int power)
Multiplies a decimal by a power of 10.
|
HiveDecimalV1 |
HiveDecimalV1.setScale(int i) |
HiveDecimal |
HiveDecimal.setScale(int serializationScale)
Deprecated.
|
HiveDecimalV1 |
HiveDecimalV1.setScale(int adjustedScale,
int rm) |
HiveDecimal |
HiveDecimal.setScale(int roundingPoint,
int roundingMode)
Do decimal rounding and return the result.
|
short |
HiveDecimalV1.shortValue()
Note - this method will corrupt the value if it doesn't fit.
|
short |
HiveDecimal.shortValue()
A short variation of longValue().
|
int |
HiveDecimalV1.signum()
Get the sign of the underlying decimal.
|
int |
HiveDecimal.signum()
Get the sign of the decimal.
|
HiveDecimal |
HiveDecimal.subtract(HiveDecimal dec)
Subtract from the current decimal another decimal and return the result.
|
HiveDecimalV1 |
HiveDecimalV1.subtract(HiveDecimalV1 dec) |
String |
HiveDecimalV1.toFormatString(int scale)
Return a string representation of the number with the number of decimal digits as
the given scale.
|
String |
HiveDecimal.toFormatString(int formatScale)
Return a string representation of the decimal using the specified scale.
|
String |
HiveDecimalV1.toString() |
String |
HiveDecimal.toString()
Return a string representation of the decimal.
|
BigInteger |
HiveDecimalV1.unscaledValue() |
BigInteger |
HiveDecimal.unscaledValue()
Get a BigInteger representing the decimal's digits without a dot.
|
Copyright © 2021 The Apache Software Foundation. All rights reserved.