private int getPrecisionForType(PrimitiveTypeInfo typeInfo) {
    if (isFloatFamily(typeInfo.getTypeName())) {
      return HiveDecimal.MAX_PRECISION;
    }
    return HiveDecimalUtils.getPrecisionForType(typeInfo);
  }
The GenericUDFs might need their children output to be cast to the given castType.
This method returns a cast expression that would achieve the required casting.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java