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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetStartRow(), other.isSetStartRow());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStartRow()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRow, other.startRow);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetStopRow(), other.isSetStopRow());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStopRow()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stopRow, other.stopRow);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetColumns(), other.isSetColumns());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetColumns()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, other.columns);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetCaching(), other.isSetCaching());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCaching()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.caching, other.caching);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetMaxVersions(), other.isSetMaxVersions());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMaxVersions()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxVersions, other.maxVersions);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTimeRange(), other.isSetTimeRange());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTimeRange()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeRange, other.timeRange);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetFilterString(), other.isSetFilterString());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFilterString()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterString, other.filterString);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBatchSize(), other.isSetBatchSize());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBatchSize()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batchSize, other.batchSize);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetAttributes(), other.isSetAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, other.attributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetAuthorizations(), other.isSetAuthorizations());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAuthorizations()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authorizations, other.authorizations);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetReversed(), other.isSetReversed());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetReversed()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reversed, other.reversed);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetCacheBlocks(), other.isSetCacheBlocks());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCacheBlocks()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cacheBlocks, other.cacheBlocks);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetColFamTimeRangeMap(), other.isSetColFamTimeRangeMap());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetColFamTimeRangeMap()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colFamTimeRangeMap, other.colFamTimeRangeMap);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetReadType(), other.isSetReadType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetReadType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.readType, other.readType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetLimit(), other.isSetLimit());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLimit()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.limit, other.limit);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetConsistency(), other.isSetConsistency());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetConsistency()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.consistency, other.consistency);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTargetReplicaId(), other.isSetTargetReplicaId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTargetReplicaId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.targetReplicaId, other.targetReplicaId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetFilterBytes(), other.isSetFilterBytes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFilterBytes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterBytes, other.filterBytes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java