public BucketingInfo deepCopy() { return new BucketingInfo(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof BucketingInfo) return this.equals((BucketingInfo)that); return false; }
public Object getFieldValue(_Fields field) { switch (field) { case TABLE_COLUMNS: return getTable_columns(); case NUMBER_OF_BUCKETS: return getNumber_of_buckets(); } throw new IllegalStateException(); }
public void setFieldValue(_Fields field, Object value) { switch (field) { case TABLE_COLUMNS: if (value == null) { unsetTable_columns(); } else { setTable_columns((List<ColumnSchema>)value); } break; case NUMBER_OF_BUCKETS: if (value == null) { unsetNumber_of_buckets(); } else { setNumber_of_buckets((Integer)value); } break; } }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case TABLE_COLUMNS: return isSetTable_columns(); case NUMBER_OF_BUCKETS: return isSetNumber_of_buckets(); } throw new IllegalStateException(); }
struct.setTable_columnsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.number_of_buckets = iprot.readI32(); struct.setNumber_of_bucketsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (!struct.isSetNumber_of_buckets()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'number_of_buckets' was not found in serialized data! Struct: " + toString()); struct.validate();
case 5: // BUCKETING_INFO if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.bucketingInfo = new BucketingInfo(); struct.bucketingInfo.read(iprot); struct.setBucketingInfoIsSet(true); } else {
@Override public void read(org.apache.thrift.protocol.TProtocol prot, BucketingInfo struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; { org.apache.thrift.protocol.TList _list95 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.table_columns = new ArrayList<ColumnSchema>(_list95.size); ColumnSchema _elem96; for (int _i97 = 0; _i97 < _list95.size; ++_i97) { _elem96 = new ColumnSchema(); _elem96.read(iprot); struct.table_columns.add(_elem96); } } struct.setTable_columnsIsSet(true); struct.number_of_buckets = iprot.readI32(); struct.setNumber_of_bucketsIsSet(true); } }
@Override public void clear() { this.table_columns = null; setNumber_of_bucketsIsSet(false); this.number_of_buckets = 0; }
public boolean equals(BucketingInfo that) { if (that == null) return false; boolean this_present_table_columns = true && this.isSetTable_columns(); boolean that_present_table_columns = true && that.isSetTable_columns(); if (this_present_table_columns || that_present_table_columns) { if (!(this_present_table_columns && that_present_table_columns)) return false; if (!this.table_columns.equals(that.table_columns)) return false; } boolean this_present_number_of_buckets = true; boolean that_present_number_of_buckets = true; if (this_present_number_of_buckets || that_present_number_of_buckets) { if (!(this_present_number_of_buckets && that_present_number_of_buckets)) return false; if (this.number_of_buckets != that.number_of_buckets) return false; } return true; }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
struct.bucketingInfo = new BucketingInfo(); struct.bucketingInfo.read(iprot); struct.setBucketingInfoIsSet(true);
@Override public int compareTo(BucketingInfo other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetTable_columns()).compareTo(other.isSetTable_columns()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_columns()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_columns, other.table_columns); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNumber_of_buckets()).compareTo(other.isSetNumber_of_buckets()); if (lastComparison != 0) { return lastComparison; } if (isSetNumber_of_buckets()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number_of_buckets, other.number_of_buckets); if (lastComparison != 0) { return lastComparison; } } return 0; }
public BucketingInfo setNumber_of_buckets(int number_of_buckets) { this.number_of_buckets = number_of_buckets; setNumber_of_bucketsIsSet(true); return this; }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_table_columns = true && (isSetTable_columns()); list.add(present_table_columns); if (present_table_columns) list.add(table_columns); boolean present_number_of_buckets = true; list.add(present_number_of_buckets); if (present_number_of_buckets) list.add(number_of_buckets); return list.hashCode(); }
private org.apache.carbondata.format.BucketingInfo fromWrapperToExternalBucketingInfo( BucketingInfo bucketingInfo) { List<org.apache.carbondata.format.ColumnSchema> thriftColumnSchema = new ArrayList<org.apache.carbondata.format.ColumnSchema>(); for (ColumnSchema wrapperColumnSchema : bucketingInfo.getListOfColumns()) { thriftColumnSchema.add(fromWrapperToExternalColumnSchema(wrapperColumnSchema)); } return new org.apache.carbondata.format.BucketingInfo(thriftColumnSchema, bucketingInfo.getNumOfRanges()); }
public BucketingInfo( List<ColumnSchema> table_columns, int number_of_buckets) { this(); this.table_columns = table_columns; this.number_of_buckets = number_of_buckets; setNumber_of_bucketsIsSet(true); }
/** * Performs a deep copy on <i>other</i>. */ public BucketingInfo(BucketingInfo other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetTable_columns()) { List<ColumnSchema> __this__table_columns = new ArrayList<ColumnSchema>(other.table_columns.size()); for (ColumnSchema other_element : other.table_columns) { __this__table_columns.add(new ColumnSchema(other_element)); } this.table_columns = __this__table_columns; } this.number_of_buckets = other.number_of_buckets; }
if (!(this_present_bucketingInfo && that_present_bucketingInfo)) return false; if (!this.bucketingInfo.equals(that.bucketingInfo)) return false;
this.bucketingInfo = new BucketingInfo(other.bucketingInfo);