@Override
  public Method getEvalMethod(List<TypeInfo> argClasses) throws UDFArgumentException {
    if (strictTsConversion) {
      TypeInfo arg = argClasses.get(0);
      if (arg instanceof PrimitiveTypeInfo) {
        PrimitiveTypeInfo primitiveTypeInfo = (PrimitiveTypeInfo) arg;
        PrimitiveCategory category = primitiveTypeInfo.getPrimitiveCategory();
        PrimitiveGrouping group = PrimitiveObjectInspectorUtils.getPrimitiveGrouping(category);
        if (group == PrimitiveGrouping.DATE_GROUP) {
          throw new UDFArgumentException(
              "Casting DATE/TIMESTAMP types to NUMERIC is prohibited (" + ConfVars.HIVE_STRICT_TIMESTAMP_CONVERSION
                  + ")");
        }
      }
    }
    return parentResolver.getEvalMethod(argClasses);
  }
Restricts casting timestamp/date types to numeric values.

This Resolver is used in {@link UDF} implementations to enforce strict conversion rules.
ql/src/java/org/apache/hadoop/hive/ql/udf/TimestampCastRestrictorResolver.java