@Override
  public int compareTo(Operator other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetOperatorId(), other.isSetOperatorId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOperatorId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operatorId, other.operatorId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetOperatorType(), other.isSetOperatorType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOperatorType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operatorType, other.operatorType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetOperatorAttributes(), other.isSetOperatorAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOperatorAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operatorAttributes, other.operatorAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetOperatorCounters(), other.isSetOperatorCounters());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOperatorCounters()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operatorCounters, other.operatorCounters);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetDone(), other.isSetDone());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDone()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.done, other.done);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetStarted(), other.isSetStarted());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStarted()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.started, other.started);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java