public Integer compare(DeferredObject[] arguments) throws HiveException {
    Object o0,o1;
    o0 = arguments[0].get();
    if (o0 == null) {
      return null;
    }
    o1 = arguments[1].get();
    if (o1 == null) {
      return null;
    }

    if (compareType == CompareType.NEED_CONVERT) {
      Object converted_o0 = converter0.convert(o0);
      if (converted_o0 == null) {
        return null;
      }
      Object converted_o1 = converter1.convert(o1);
      if (converted_o1 == null) {
        return null;
      }
      return ObjectInspectorUtils.compare(
          converted_o0, compareOI,
          converted_o1, compareOI);
    } else {
      return ObjectInspectorUtils.compare(
          o0, argumentOIs[0], o1, argumentOIs[1]);
    }
  }
Returns whether the operator can handle operands with the specified category.
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBaseCompare.java