@Override
  public Object evaluate(DeferredObject[] arguments) throws HiveException {
    if (true) {
        throw new NullPointerException("evaluate null pointer exception");
    }
    return result;
  }
GenericUDFEvaluateNPE
This UDF is to throw an Null Pointer Exception
It is used to test hive failure handling
itests/util/src/main/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFEvaluateNPE.java