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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetStageId(), other.isSetStageId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStageId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stageId, other.stageId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetStageType(), other.isSetStageType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStageType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stageType, other.stageType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetStageAttributes(), other.isSetStageAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStageAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stageAttributes, other.stageAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetStageCounters(), other.isSetStageCounters());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStageCounters()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stageCounters, other.stageCounters);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTaskList(), other.isSetTaskList());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTaskList()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskList, other.taskList);
      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/Stage.java