public void copyToNewInstance(Object newInstance) throws UDFArgumentException {
    super.copyToNewInstance(newInstance);
    GenericUDFBaseNumeric other = (GenericUDFBaseNumeric) newInstance;
    other.confLookupNeeded = this.confLookupNeeded;
    other.ansiSqlArithmetic = this.ansiSqlArithmetic;
  }
Create DecimalTypeInfo from input precision/scale, adjusting if necessary to fit max precision
@param precision precision value before adjustment
@param scale scale value before adjustment
@return
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBaseNumeric.java