@Override
  public Object evaluate(DeferredObject[] arguments) throws HiveException {
    for (int i = 0; i < arguments.length; i++) {
      Object ai = arguments[i].get();
      if (ai == null) {
        continue;
      }
      return returnOIResolver.convertIfNecessary(ai, argumentOIs[i]);
    }
    return null;
  }
GenericUDF Class for SQL construct "COALESCE(a, b, c)".

NOTES: 1. a, b and c should have the same TypeInfo, or an exception will be
thrown.
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCoalesce.java