private static int[] multiplyArrays4And4To8(int[] left, int[] right) {
    assert (left.length == 4);
    assert (right.length == 4);
    long product;

    // this method could go beyond the integer ranges until we scale back
    // so, we need twice more variables.
    int[] z = new int[8];

    product = (right[0] & SqlMathUtil.LONG_MASK)
        * (left[0] & SqlMathUtil.LONG_MASK);
    z[0] = (int) product;

    product = (right[0] & SqlMathUtil.LONG_MASK)
        * (left[1] & SqlMathUtil.LONG_MASK)
        + (right[1] & SqlMathUtil.LONG_MASK)
        * (left[0] & SqlMathUtil.LONG_MASK) + (product >>> 32);
    z[1] = (int) product;

    product = (right[0] & SqlMathUtil.LONG_MASK)
        * (left[2] & SqlMathUtil.LONG_MASK)
        + (right[1] & SqlMathUtil.LONG_MASK)
        * (left[1] & SqlMathUtil.LONG_MASK)
        + (right[2] & SqlMathUtil.LONG_MASK)
        * (left[0] & SqlMathUtil.LONG_MASK) + (product >>> 32);
    z[2] = (int) product;

    product = (right[0] & SqlMathUtil.LONG_MASK)
        * (left[3] & SqlMathUtil.LONG_MASK)
        + (right[1] & SqlMathUtil.LONG_MASK)
        * (left[2] & SqlMathUtil.LONG_MASK)
        + (right[2] & SqlMathUtil.LONG_MASK)
        * (left[1] & SqlMathUtil.LONG_MASK)
        + (right[3] & SqlMathUtil.LONG_MASK)
        * (left[0] & SqlMathUtil.LONG_MASK) + (product >>> 32);
    z[3] = (int) product;

    product = (right[1] & SqlMathUtil.LONG_MASK)
        * (left[3] & SqlMathUtil.LONG_MASK)
        + (right[2] & SqlMathUtil.LONG_MASK)
        * (left[2] & SqlMathUtil.LONG_MASK)
        + (right[3] & SqlMathUtil.LONG_MASK)
        * (left[1] & SqlMathUtil.LONG_MASK) + (product >>> 32);
    z[4] = (int) product;

    product = (right[2] & SqlMathUtil.LONG_MASK)
        * (left[3] & SqlMathUtil.LONG_MASK)
        + (right[3] & SqlMathUtil.LONG_MASK)
        * (left[2] & SqlMathUtil.LONG_MASK) + (product >>> 32);
    z[5] = (int) product;

    // v[1], v[0]
    product = (right[3] & SqlMathUtil.LONG_MASK)
        * (left[3] & SqlMathUtil.LONG_MASK) + (product >>> 32);
    z[6] = (int) product;
    z[7] = (int) (product >>> 32);

    return z;
  }
Multiplies this value with the given value.

@param left
         the value to multiply. in AND out.
@param right
         the value to multiply. in
common/src/java/org/apache/hadoop/hive/common/type/UnsignedInt128.java