public static String getTaskAttemptNumber(ObjectInspector[] parameters, int index) throws UDFArgumentTypeException {
    return getExpressionAtIndex(parameters, index);
  }
This class implements the UDF which can throw an exception in arbitrary vertex (typically mapper)
/ task / task attempt. For throwing exception in reducer side, where most probably
GroupByOperator codepath applies, GenericUDAFExceptionInVertex is used.
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFExceptionInVertex.java