public static boolean isExactNumericType(PrimitiveTypeInfo typeInfo) {
    switch (typeInfo.getPrimitiveCategory()) {
      case BYTE:
      case SHORT:
      case INT:
      case LONG:
      case DECIMAL:
        return true;
      default:
        return false;
    }
  }
Check if a type is exact (not approximate such as float and double). String is considered as
double, thus not exact.

@param typeInfo
@return
ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java