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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetAint(), other.isSetAint());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAint()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aint, other.aint);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetAString(), other.isSetAString());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAString()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aString, other.aString);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetLint(), other.isSetLint());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLint()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lint, other.lint);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetLString(), other.isSetLString());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLString()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lString, other.lString);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetLintString(), other.isSetLintString());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLintString()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lintString, other.lintString);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetMStringString(), other.isSetMStringString());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMStringString()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mStringString, other.mStringString);
      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(isSetUnionField1(), other.isSetUnionField1());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUnionField1()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unionField1, other.unionField1);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetUnionField2(), other.isSetUnionField2());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUnionField2()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unionField2, other.unionField2);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetUnionField3(), other.isSetUnionField3());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUnionField3()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unionField3, other.unionField3);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java