public IntWritable evaluate(HiveDecimalWritable decWritable) {
    if (decWritable == null || !decWritable.isSet()) {
      return null;
    }

    intWritable.set(decWritable.signum());
    return intWritable;
  }
Get the sign of the decimal input

@param decWritable decimal input

@return -1, 0, or 1 representing the sign of the input decimal
ql/src/java/org/apache/hadoop/hive/ql/udf/UDFSign.java