public static void fastSetFromLong(
      long longValue, FastHiveDecimal fastResult) {
    if (longValue == 0) {
      // Zero special case.
      return;
    }
    // Handle minimum integer case that doesn't have abs().
    if (longValue == Long.MIN_VALUE) {
      // Split -9,223,372,036,854,775,808 into 16 digit middle and lowest longwords by hand.
      fastResult.fastSignum = -1;
      fastResult.fast1 = 922L;
      fastResult.fast0 = 3372036854775808L;
      fastResult.fastIntegerDigitCount = 19;
    } else {
      if (longValue > 0) {
        fastResult.fastSignum = 1;
      } else {
        fastResult.fastSignum = -1;
        longValue = Math.abs(longValue);
      }
      // Split into 16 digit middle and lowest longwords remainder / division.
      fastResult.fast1 = longValue / MULTIPLER_LONGWORD_DECIMAL;
      fastResult.fast0 = longValue % MULTIPLER_LONGWORD_DECIMAL;
      if (fastResult.fast1 != 0) {
        fastResult.fastIntegerDigitCount =
            LONGWORD_DECIMAL_DIGITS + fastLongWordPrecision(fastResult.fast1);
      } else {
        fastResult.fastIntegerDigitCount =
            fastLongWordPrecision(fastResult.fast0);
      }
    }
    return;
  }
Creates a scale 0 fast decimal from a long.

NOTE: The fastSetFromLong method requires the caller to pass a fastResult
parameter has been reset for better performance.

@param longValue the value to set
@param fastResult an object to reuse
storage-api/src/java/org/apache/hadoop/hive/common/type/FastHiveDecimalImpl.java