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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetDbname(), other.isSetDbname());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDbname()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTablename(), other.isSetTablename());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTablename()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, other.tablename);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetPartitionname(), other.isSetPartitionname());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPartitionname()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionname, other.partitionname);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetRunas(), other.isSetRunas());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRunas()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runas, other.runas);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetProperties(), other.isSetProperties());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetProperties()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.properties, other.properties);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetInitiatorId(), other.isSetInitiatorId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetInitiatorId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.initiatorId, other.initiatorId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetInitiatorVersion(), other.isSetInitiatorVersion());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetInitiatorVersion()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.initiatorVersion, other.initiatorVersion);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetPoolName(), other.isSetPoolName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPoolName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poolName, other.poolName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetNumberOfBuckets(), other.isSetNumberOfBuckets());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNumberOfBuckets()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numberOfBuckets, other.numberOfBuckets);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetOrderByClause(), other.isSetOrderByClause());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOrderByClause()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderByClause, other.orderByClause);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionRequest.java