public class FastHiveDecimal extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
FastHiveDecimal.FastCheckPrecisionScaleStatus |
Modifier and Type | Field and Description |
---|---|
protected static int |
FAST_SCRATCH_BUFFER_LEN_BIG_INTEGER_BYTES |
protected static int |
FAST_SCRATCH_BUFFER_LEN_SERIALIZATION_UTILS_READ |
protected static int |
FAST_SCRATCH_BUFFER_LEN_TO_BYTES |
protected static int |
FAST_SCRATCH_LONGS_LEN |
protected long |
fast0 |
protected long |
fast1 |
protected long |
fast2 |
protected int |
fastIntegerDigitCount |
protected int |
fastScale |
protected int |
fastSerializationScale |
protected int |
fastSignum |
protected static int |
SCRATCH_LONGS_LEN_FAST_SERIALIZATION_UTILS_WRITE |
protected static String |
STRING_ENFORCE_PRECISION_OUT_OF_RANGE |
protected static String |
STRING_ENFORCE_SCALE_LESS_THAN_EQUAL_PRECISION |
protected static String |
STRING_ENFORCE_SCALE_OUT_OF_RANGE |
Modifier | Constructor and Description |
---|---|
protected |
FastHiveDecimal() |
protected |
FastHiveDecimal(FastHiveDecimal fastDec) |
protected |
FastHiveDecimal(int fastSignum,
FastHiveDecimal fastDec) |
protected |
FastHiveDecimal(int fastSignum,
long fast0,
long fast1,
long fast2,
int fastIntegerDigitCount,
int fastScale) |
protected |
FastHiveDecimal(long longValue) |
protected |
FastHiveDecimal(String string) |
Modifier and Type | Method and Description |
---|---|
protected void |
fastAbs() |
protected boolean |
fastAdd(FastHiveDecimal fastRight,
FastHiveDecimal fastResult) |
protected BigDecimal |
fastBigDecimalValue() |
protected int |
fastBigIntegerBytes(long[] scratchLongs,
byte[] buffer) |
protected int |
fastBigIntegerBytesScaled(int serializationScale,
long[] scratchLongs,
byte[] buffer) |
protected BigInteger |
fastBigIntegerValue() |
protected byte |
fastByteValueClip() |
protected FastHiveDecimal.FastCheckPrecisionScaleStatus |
fastCheckPrecisionScale(int maxPrecision,
int maxScale) |
protected int |
fastCompareTo(FastHiveDecimal right) |
protected static int |
fastCompareTo(FastHiveDecimal left,
FastHiveDecimal right) |
protected void |
fastDeserialize64(long decimalLong,
int scale) |
protected boolean |
fastDivide(FastHiveDecimal fastRight,
FastHiveDecimal fastResult) |
protected double |
fastDoubleValue() |
protected boolean |
fastEnforcePrecisionScale(int maxPrecision,
int maxScale) |
protected boolean |
fastEquals(FastHiveDecimal that) |
protected float |
fastFloatValue() |
protected void |
fastFractionPortion() |
protected int |
fastHashCode() |
protected int |
fastIntegerDigitCount() |
protected void |
fastIntegerPortion() |
protected int |
fastIntValueClip() |
protected boolean |
fastIsByte() |
protected boolean |
fastIsInt() |
protected boolean |
fastIsLong() |
protected boolean |
fastIsShort() |
protected boolean |
fastIsValid() |
protected long |
fastLongValueClip() |
protected boolean |
fastMultiply(FastHiveDecimal fastRight,
FastHiveDecimal fastResult) |
protected void |
fastNegate() |
protected int |
fastNewFasterHashCode() |
protected boolean |
fastPow(int exponent,
FastHiveDecimal fastResult) |
protected void |
fastRaiseInvalidException() |
protected void |
fastRaiseInvalidException(String parameters) |
protected int |
fastRawPrecision() |
protected boolean |
fastRemainder(FastHiveDecimal fastRight,
FastHiveDecimal fastResult) |
protected void |
fastReset() |
protected boolean |
fastRound(int newScale,
int roundingMode,
FastHiveDecimal fastResult) |
protected static String |
fastRoundingModeToString(int roundingMode) |
protected int |
fastScale() |
protected boolean |
fastScaleByPowerOfTen(int n,
FastHiveDecimal fastResult) |
protected int |
fastSerializationScale() |
protected boolean |
fastSerializationUtilsRead(InputStream inputStream,
int scale,
byte[] scratchBytes) |
protected boolean |
fastSerializationUtilsWrite(OutputStream outputStream,
long[] scratchLongs) |
protected long |
fastSerialize64(int scale) |
protected void |
fastSet(FastHiveDecimal fastDec) |
protected void |
fastSet(int fastSignum,
long fast0,
long fast1,
long fast2,
int fastIntegerDigitCount,
int fastScale) |
protected boolean |
fastSetFromBigDecimal(BigDecimal bigDecimal,
boolean allowRounding) |
protected boolean |
fastSetFromBigInteger(BigInteger bigInteger) |
protected boolean |
fastSetFromBigIntegerAndScale(BigInteger bigInteger,
int scale) |
protected boolean |
fastSetFromBigIntegerBytesAndScale(byte[] bytes,
int offset,
int length,
int scale) |
protected boolean |
fastSetFromBytes(byte[] bytes,
int offset,
int length,
boolean trimBlanks) |
protected boolean |
fastSetFromDigitsOnlyBytesAndScale(boolean isNegative,
byte[] bytes,
int offset,
int length,
int scale) |
protected boolean |
fastSetFromDouble(double doubleValue) |
protected boolean |
fastSetFromFloat(float floatValue) |
protected void |
fastSetFromInt(int intValue) |
protected void |
fastSetFromLong(long longValue) |
protected boolean |
fastSetFromLongAndScale(long longValue,
int scale) |
protected boolean |
fastSetFromString(String string,
boolean trimBlanks) |
protected void |
fastSetSerializationScale(int fastSerializationScale) |
protected short |
fastShortValueClip() |
protected int |
fastSignum() |
protected int |
fastSqlPrecision() |
protected boolean |
fastSubtract(FastHiveDecimal fastRight,
FastHiveDecimal fastResult) |
protected int |
fastToBytes(byte[] scratchBuffer) |
protected int |
fastToDigitsOnlyBytes(byte[] scratchBuffer) |
protected String |
fastToDigitsOnlyString() |
protected int |
fastToFormatBytes(int formatScale,
byte[] scratchBuffer) |
protected String |
fastToFormatString(int formatScale) |
protected String |
fastToFormatString(int formatScale,
byte[] scratchBuffer) |
protected String |
fastToString() |
protected String |
fastToString(byte[] scratchBuffer) |
protected boolean |
fastUpdatePrecisionScale(int maxPrecision,
int maxScale,
FastHiveDecimal.FastCheckPrecisionScaleStatus status,
FastHiveDecimal fastResult) |
protected boolean |
isAllZeroesBelow(int power) |
String |
toString() |
protected int fastSignum
protected long fast2
protected long fast1
protected long fast0
protected int fastIntegerDigitCount
protected int fastScale
protected int fastSerializationScale
protected static final String STRING_ENFORCE_PRECISION_OUT_OF_RANGE
protected static final String STRING_ENFORCE_SCALE_OUT_OF_RANGE
protected static final String STRING_ENFORCE_SCALE_LESS_THAN_EQUAL_PRECISION
protected static final int FAST_SCRATCH_BUFFER_LEN_SERIALIZATION_UTILS_READ
protected static final int SCRATCH_LONGS_LEN_FAST_SERIALIZATION_UTILS_WRITE
protected static final int FAST_SCRATCH_BUFFER_LEN_BIG_INTEGER_BYTES
protected static final int FAST_SCRATCH_LONGS_LEN
protected static final int FAST_SCRATCH_BUFFER_LEN_TO_BYTES
protected FastHiveDecimal()
protected FastHiveDecimal(FastHiveDecimal fastDec)
protected FastHiveDecimal(int fastSignum, FastHiveDecimal fastDec)
protected FastHiveDecimal(int fastSignum, long fast0, long fast1, long fast2, int fastIntegerDigitCount, int fastScale)
protected FastHiveDecimal(long longValue)
protected FastHiveDecimal(String string)
protected void fastReset()
protected void fastSet(FastHiveDecimal fastDec)
protected void fastSet(int fastSignum, long fast0, long fast1, long fast2, int fastIntegerDigitCount, int fastScale)
protected void fastSetSerializationScale(int fastSerializationScale)
protected int fastSerializationScale()
protected boolean fastSetFromBigDecimal(BigDecimal bigDecimal, boolean allowRounding)
protected boolean fastSetFromBigInteger(BigInteger bigInteger)
protected boolean fastSetFromBigIntegerAndScale(BigInteger bigInteger, int scale)
protected boolean fastSetFromString(String string, boolean trimBlanks)
protected boolean fastSetFromBytes(byte[] bytes, int offset, int length, boolean trimBlanks)
protected boolean fastSetFromDigitsOnlyBytesAndScale(boolean isNegative, byte[] bytes, int offset, int length, int scale)
protected void fastSetFromInt(int intValue)
protected void fastSetFromLong(long longValue)
protected boolean fastSetFromLongAndScale(long longValue, int scale)
protected boolean fastSetFromFloat(float floatValue)
protected boolean fastSetFromDouble(double doubleValue)
protected void fastFractionPortion()
protected void fastIntegerPortion()
protected boolean fastSerializationUtilsRead(InputStream inputStream, int scale, byte[] scratchBytes) throws IOException, EOFException
IOException
EOFException
protected boolean fastSetFromBigIntegerBytesAndScale(byte[] bytes, int offset, int length, int scale)
protected boolean fastSerializationUtilsWrite(OutputStream outputStream, long[] scratchLongs) throws IOException
IOException
protected void fastDeserialize64(long decimalLong, int scale)
protected long fastSerialize64(int scale)
protected int fastBigIntegerBytes(long[] scratchLongs, byte[] buffer)
protected int fastBigIntegerBytesScaled(int serializationScale, long[] scratchLongs, byte[] buffer)
protected boolean fastIsByte()
protected byte fastByteValueClip()
protected boolean fastIsShort()
protected short fastShortValueClip()
protected boolean fastIsInt()
protected int fastIntValueClip()
protected boolean fastIsLong()
protected long fastLongValueClip()
protected float fastFloatValue()
protected double fastDoubleValue()
protected BigInteger fastBigIntegerValue()
protected BigDecimal fastBigDecimalValue()
protected int fastScale()
protected int fastSignum()
protected int fastCompareTo(FastHiveDecimal right)
protected static int fastCompareTo(FastHiveDecimal left, FastHiveDecimal right)
protected boolean fastEquals(FastHiveDecimal that)
protected void fastAbs()
protected void fastNegate()
protected int fastNewFasterHashCode()
protected int fastHashCode()
protected int fastIntegerDigitCount()
protected int fastSqlPrecision()
protected int fastRawPrecision()
protected boolean fastScaleByPowerOfTen(int n, FastHiveDecimal fastResult)
protected static String fastRoundingModeToString(int roundingMode)
protected boolean fastRound(int newScale, int roundingMode, FastHiveDecimal fastResult)
protected boolean isAllZeroesBelow(int power)
protected boolean fastEnforcePrecisionScale(int maxPrecision, int maxScale)
protected FastHiveDecimal.FastCheckPrecisionScaleStatus fastCheckPrecisionScale(int maxPrecision, int maxScale)
protected boolean fastUpdatePrecisionScale(int maxPrecision, int maxScale, FastHiveDecimal.FastCheckPrecisionScaleStatus status, FastHiveDecimal fastResult)
protected boolean fastAdd(FastHiveDecimal fastRight, FastHiveDecimal fastResult)
protected boolean fastSubtract(FastHiveDecimal fastRight, FastHiveDecimal fastResult)
protected boolean fastMultiply(FastHiveDecimal fastRight, FastHiveDecimal fastResult)
protected boolean fastRemainder(FastHiveDecimal fastRight, FastHiveDecimal fastResult)
protected boolean fastDivide(FastHiveDecimal fastRight, FastHiveDecimal fastResult)
protected boolean fastPow(int exponent, FastHiveDecimal fastResult)
protected String fastToString(byte[] scratchBuffer)
protected String fastToString()
protected String fastToFormatString(int formatScale)
protected String fastToFormatString(int formatScale, byte[] scratchBuffer)
protected String fastToDigitsOnlyString()
protected int fastToBytes(byte[] scratchBuffer)
protected int fastToFormatBytes(int formatScale, byte[] scratchBuffer)
protected int fastToDigitsOnlyBytes(byte[] scratchBuffer)
protected boolean fastIsValid()
protected void fastRaiseInvalidException()
protected void fastRaiseInvalidException(String parameters)
Copyright © 2021 The Apache Software Foundation. All rights reserved.