@Override
  public Object evaluate(DeferredObject[] arguments) throws HiveException {
    StringBuilder nonUniqueKey = new StringBuilder();
    for (DeferredObject t : arguments) {
      if (nonUniqueKey.length() > 0) {
        nonUniqueKey.append(',');
      }
      nonUniqueKey.append(t.get());
    }
    throw new RuntimeException("Cardinality Violation in Merge statement: " + nonUniqueKey);
  }
Function intended to fail. It is used in query parts which should not return anything, and thus mark the problem.
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCardinalityViolation.java