@Override
  public boolean equals(Object x) {
    if (x == this) {
      return true;
    }
    if (!(x instanceof Decimal128)) {
      return false;
    }

    Decimal128 xDec = (Decimal128) x;
    if (scale != xDec.scale) {
      return false;
    }
    if (signum != xDec.signum) {
      return false;
    }

    return unscaledValue.equals(xDec.unscaledValue);
  }
Compares this {@code Decimal128} with the specified {@code Object} for
equality. Unlike {@link #compareTo(Decimal128) compareTo}, this method
considers two {@code Decimal128} objects equal only if they are equal in
value and scale (thus 2.0 is not equal to 2.00 when compared by this
method). This somewhat confusing behavior is, however, same as
java.math.BigDecimal.

@param x
         {@code Object} to which this {@code Decimal128} is to be compared.
@return {@code true} if and only if the specified {@code Object} is a
        {@code Decimal128} whose value and scale are equal to this
        {@code Decimal128}'s.
@see #compareTo(Decimal128)
@see #hashCode
common/src/java/org/apache/hadoop/hive/common/type/Decimal128.java