@SuppressFBWarnings(value = "SF_SWITCH_FALLTHROUGH", justification = "Intentional fall through")
    private int fastUpdateIntFromInternalStorage(byte[] internalStorage,
            byte signum, int pos, int length) {
      // due to the way we use the allocation-free cast from HiveDecimalWriter to decimal128,
      // we do not have the luxury of a ByteBuffer...
      byte b0, b1, b2, b3;
      if (signum == -1) {
          b1=b2=b3 = (byte)-1;
      }
      else {
          b1=b2=b3=0;
      }
      switch(length) {
      case 4:
          b3 = internalStorage[pos];
          ++pos;
          //intentional fall through
      case 3:
          b2 = internalStorage[pos];
          ++pos;
          //intentional fall through
      case 2:
          b1 = internalStorage[pos];
          ++pos;
          //intentional fall through
      case 1:
          b0 = internalStorage[pos];
          break;
      default:
          // this should never happen
          throw new RuntimeException("Impossible HiveDecimal internal storage position!");
      }

      int value = ((int)b0        & 0x000000FF) |
              (((int)b1 <<  8) & 0x0000FF00) |
              (((int)b2 << 16) & 0x00FF0000) |
              (((int)b3 << 24) & 0xFF000000);

      if (signum == -1 && value != 0) {
          // Make one's complement, masked only for the bytes read
          int mask = -1 >>> (8*(4-length));
          value = ~value & mask;
      }
      return value;
    }
reads one int part from the two's complement Big-Endian compacted representation,
starting from index pos
@param internalStorage {@link java.math.BigInteger} serialized representation
@param pos
@return
common/src/java/org/apache/hadoop/hive/common/type/UnsignedInt128.java