@Override
  protected HiveDecimalWritable evaluate(HiveDecimal left, HiveDecimal right) {
    decimalWritable.set(left);
    decimalWritable.mutateAdd(right);
    return decimalWritable;
  }
The reason that we list evaluate methods with all numeric types is for both
better performance and type checking (so we know int + int is still an int
instead of a double); otherwise a single method that takes (Number a, Number
b) and use a.doubleValue() == b.doubleValue() is enough.

The case of int + double will be handled by implicit type casting using
UDFRegistry.implicitConvertable method.
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFOPNumericPlus.java