public boolean equals(DecimalColumnStatsData that) {
    if (that == null) return false;

    boolean this_present_lowValue = true && this.isSetLowValue();
    boolean that_present_lowValue = true && that.isSetLowValue();
    if (this_present_lowValue || that_present_lowValue) {
      if (!(this_present_lowValue && that_present_lowValue)) return false;
      if (!this.lowValue.equals(that.lowValue)) return false;
    }

    boolean this_present_highValue = true && this.isSetHighValue();
    boolean that_present_highValue = true && that.isSetHighValue();
    if (this_present_highValue || that_present_highValue) {
      if (!(this_present_highValue && that_present_highValue)) return false;
      if (!this.highValue.equals(that.highValue)) return false;
    }

    boolean this_present_numNulls = true;
    boolean that_present_numNulls = true;
    if (this_present_numNulls || that_present_numNulls) {
      if (!(this_present_numNulls && that_present_numNulls)) return false;
      if (this.numNulls != that.numNulls) return false;
    }

    boolean this_present_numDVs = true;
    boolean that_present_numDVs = true;
    if (this_present_numDVs || that_present_numDVs) {
      if (!(this_present_numDVs && that_present_numDVs)) return false;
      if (this.numDVs != that.numDVs) return false;
    }

    return true;
  }
    public void write(org.apache.thrift.protocol.TProtocol oprot, DecimalColumnStatsData struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.lowValue != null) {
        if (struct.isSetLowValue()) {
          oprot.writeFieldBegin(LOW_VALUE_FIELD_DESC);
          struct.lowValue.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.highValue != null) {
        if (struct.isSetHighValue()) {
          oprot.writeFieldBegin(HIGH_VALUE_FIELD_DESC);
          struct.highValue.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC);
      oprot.writeI64(struct.numNulls);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(NUM_DVS_FIELD_DESC);
      oprot.writeI64(struct.numDVs);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
 /** Performs a deep copy on <i>other</i>. */
 public DecimalColumnStatsData(DecimalColumnStatsData other) {
   __isset_bitfield = other.__isset_bitfield;
   if (other.isSetLowValue()) {
     this.lowValue = new Decimal(other.lowValue);
   }
   if (other.isSetHighValue()) {
     this.highValue = new Decimal(other.highValue);
   }
   this.numNulls = other.numNulls;
   this.numDVs = other.numDVs;
 }
 public void read(org.apache.thrift.protocol.TProtocol iprot, DecimalColumnStatsData struct)
     throws org.apache.thrift.TException {
   org.apache.thrift.protocol.TField schemeField;
   iprot.readStructBegin();
   while (true) {
     schemeField = iprot.readFieldBegin();
     if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
       break;
     }
     switch (schemeField.id) {
       case 1: // LOW_VALUE
         if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
           struct.lowValue = new Decimal();
           struct.lowValue.read(iprot);
           struct.setLowValueIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 2: // HIGH_VALUE
         if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
           struct.highValue = new Decimal();
           struct.highValue.read(iprot);
           struct.setHighValueIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 3: // NUM_NULLS
         if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
           struct.numNulls = iprot.readI64();
           struct.setNumNullsIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 4: // NUM_DVS
         if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
           struct.numDVs = iprot.readI64();
           struct.setNumDVsIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       default:
         org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
     }
     iprot.readFieldEnd();
   }
   iprot.readStructEnd();
   struct.validate();
 }
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, DecimalColumnStatsData struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   oprot.writeI64(struct.numNulls);
   oprot.writeI64(struct.numDVs);
   BitSet optionals = new BitSet();
   if (struct.isSetLowValue()) {
     optionals.set(0);
   }
   if (struct.isSetHighValue()) {
     optionals.set(1);
   }
   oprot.writeBitSet(optionals, 2);
   if (struct.isSetLowValue()) {
     struct.lowValue.write(oprot);
   }
   if (struct.isSetHighValue()) {
     struct.highValue.write(oprot);
   }
 }
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, DecimalColumnStatsData struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   struct.lowValue = new Decimal();
   struct.lowValue.read(iprot);
   struct.setLowValueIsSet(true);
   struct.highValue = new Decimal();
   struct.highValue.read(iprot);
   struct.setHighValueIsSet(true);
   struct.numNulls = iprot.readI64();
   struct.setNumNullsIsSet(true);
   struct.numDVs = iprot.readI64();
   struct.setNumDVsIsSet(true);
 }
  public int compareTo(DecimalColumnStatsData other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;
    DecimalColumnStatsData typedOther = (DecimalColumnStatsData) other;

    lastComparison = Boolean.valueOf(isSetLowValue()).compareTo(typedOther.isSetLowValue());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLowValue()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lowValue, typedOther.lowValue);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetHighValue()).compareTo(typedOther.isSetHighValue());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetHighValue()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.highValue, typedOther.highValue);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(typedOther.isSetNumNulls());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNumNulls()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, typedOther.numNulls);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetNumDVs()).compareTo(typedOther.isSetNumDVs());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNumDVs()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numDVs, typedOther.numDVs);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }