/** * Does this writable have a current value? * <p> * A return of false means a current value wasn't set, or an operation like mutateAdd overflowed, * or a set* method couldn't convert the input value, etc. * */ @HiveDecimalWritableVersionV2 public boolean isSet() { return isSet; }
/** * Returns the scratch array containing the result after a call to bigIntegerBytesInternalScratch. * */ @HiveDecimalWritableVersionV2 public byte[] bigIntegerBytesInternalScratchBuffer() { return internalScratchBuffer; }
@HiveDecimalWritableVersionV2 public void mutateAbs() { if (!isSet) { return; } fastAbs(); }
@HiveDecimalWritableVersionV2 public void mutateDivide(HiveDecimalWritable decWritable) { if (!isSet || !decWritable.isSet) { isSet = false; return; } isSet = fastDivide(decWritable, this); }
@HiveDecimalWritableVersionV2 public void deserialize64( long decimal64Long, int scale) { fastDeserialize64(decimal64Long, scale); isSet = true; }
@HiveDecimalWritableVersionV2 public void mutateAdd(HiveDecimalWritable decWritable) { if (!isSet || !decWritable.isSet) { isSet = false; return; } isSet = fastAdd(decWritable, this); }
@HiveDecimalWritableVersionV2 public boolean isValid() { if (!isSet) { return false; } return FastHiveDecimalImpl.fastIsValid(this); }
@HiveDecimalWritableVersionV2 public void mutateMultiply(HiveDecimalWritable decWritable) { if (!isSet || !decWritable.isSet) { isSet = false; return; } isSet = fastMultiply(decWritable, this); }
@HiveDecimalWritableVersionV2 public void mutateScaleByPowerOfTen(int power) { if (!isSet) { return; } isSet = fastScaleByPowerOfTen(power, this); }
@HiveDecimalWritableVersionV2 public boolean isInt() { if (!isSet()) { throw new RuntimeException("no value set"); } return fastIsInt(); }
@HiveDecimalWritableVersionV2 public int toFormatBytes( int formatScale, byte[] scratchBuffer) { if (!isSet()) { throw new RuntimeException("no value set"); } return fastToFormatBytes( formatScale, scratchBuffer); }
@HiveDecimalWritableVersionV2 public int precision() { if (!isSet()) { throw new RuntimeException("no value set"); } return fastSqlPrecision(); }
@HiveDecimalWritableVersionV2 public boolean isShort() { if (!isSet()) { throw new RuntimeException("no value set"); } return fastIsShort(); }
@HiveDecimalWritableVersionV2 public float floatValue() { if (!isSet()) { throw new RuntimeException("no value set"); } return fastFloatValue(); }
@HiveDecimalWritableVersionV2 public long longValue() { if (!isSet()) { throw new RuntimeException("no value set"); } return fastLongValueClip(); }
@HiveDecimalWritableVersionV2 public int toBytes(byte[] scratchBuffer) { if (!isSet()) { throw new RuntimeException("no value set"); } return fastToBytes(scratchBuffer); }
@HiveDecimalWritableVersionV2 public void mutateSetScale(int roundingPoint, int roundingMode) { if (!isSet) { return; } isSet = fastRound(roundingPoint, roundingMode, this); if (!isSet) { fastReset(); } }
@HiveDecimalWritableVersionV2 public boolean mutateEnforcePrecisionScale(int precision, int scale) { if (!isSet) { return false; } isSet = fastEnforcePrecisionScale(precision, scale); if (!isSet) { fastReset(); } return isSet; }
@HiveDecimalWritableVersionV2 public void setFromBytes(byte[] bytes, int offset, int length, boolean trimBlanks) { fastReset(); isSet = fastSetFromBytes(bytes, offset, length, trimBlanks); if (!isSet) { fastReset(); } }
@HiveDecimalWritableVersionV2 public void setFromBigIntegerBytesAndScale( byte[] bigIntegerBytes, int offset, int length, int scale) { fastReset(); isSet = fastSetFromBigIntegerBytesAndScale(bigIntegerBytes, offset, length, scale); if (!isSet) { fastReset(); } }