private DictionaryPage readDictionaryPage(PageHeader pageHeader, int uncompressedPageSize, int compressedPageSize) { DictionaryPageHeader dicHeader = pageHeader.getDictionary_page_header(); return new DictionaryPage( getSlice(compressedPageSize), uncompressedPageSize, dicHeader.getNum_values(), getParquetEncoding(Encoding.valueOf(dicHeader.getEncoding().name()))); }
public void setFieldValue(_Fields field, Object value) { switch (field) { case NUM_VALUES: if (value == null) { unsetNum_values(); } else { setNum_values((Integer)value); } break; case ENCODING: if (value == null) { unsetEncoding(); } else { setEncoding((Encoding)value); } break; case IS_SORTED: if (value == null) { unsetIs_sorted(); } else { setIs_sorted((Boolean)value); } break; } }
public Object getFieldValue(_Fields field) { switch (field) { case NUM_VALUES: return new Integer(getNum_values()); case ENCODING: return getEncoding(); case IS_SORTED: return new Boolean(isIs_sorted()); } throw new IllegalStateException(); }
if (field.type == TType.I32) { this.num_values = iprot.readI32(); setNum_valuesIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); if (field.type == TType.BOOL) { this.is_sorted = iprot.readBool(); setIs_sortedIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); if (!isSetNum_values()) { throw new TProtocolException("Required field 'num_values' was not found in serialized data! Struct: " + toString()); validate();
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case NUM_VALUES: return isSetNum_values(); case ENCODING: return isSetEncoding(); case IS_SORTED: return isSetIs_sorted(); } throw new IllegalStateException(); }
public boolean equals(DictionaryPageHeader that) { if (that == null) return false; boolean this_present_num_values = true; boolean that_present_num_values = true; if (this_present_num_values || that_present_num_values) { if (!(this_present_num_values && that_present_num_values)) return false; if (this.num_values != that.num_values) return false; } boolean this_present_encoding = true && this.isSetEncoding(); boolean that_present_encoding = true && that.isSetEncoding(); if (this_present_encoding || that_present_encoding) { if (!(this_present_encoding && that_present_encoding)) return false; if (!this.encoding.equals(that.encoding)) return false; } boolean this_present_is_sorted = true && this.isSetIs_sorted(); boolean that_present_is_sorted = true && that.isSetIs_sorted(); if (this_present_is_sorted || that_present_is_sorted) { if (!(this_present_is_sorted && that_present_is_sorted)) return false; if (this.is_sorted != that.is_sorted) return false; } return true; }
public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(NUM_VALUES_FIELD_DESC); oprot.writeI32(this.num_values); oprot.writeFieldEnd(); if (this.encoding != null) { oprot.writeFieldBegin(ENCODING_FIELD_DESC); oprot.writeI32(this.encoding.getValue()); oprot.writeFieldEnd(); } if (isSetIs_sorted()) { oprot.writeFieldBegin(IS_SORTED_FIELD_DESC); oprot.writeBool(this.is_sorted); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
case 7: // DICTIONARY_PAGE_HEADER if (field.type == TType.STRUCT) { this.dictionary_page_header = new DictionaryPageHeader(); this.dictionary_page_header.read(iprot); } else { TProtocolUtil.skip(iprot, field.type);
this.readAsBytesInput(compressedPageSize), uncompressedPageSize, dicHeader.getNum_values(), converter.getEncoding(dicHeader.getEncoding()) );
public DictionaryPageHeader deepCopy() { return new DictionaryPageHeader(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof DictionaryPageHeader) return this.equals((DictionaryPageHeader)that); return false; }
/** * Performs a deep copy on <i>other</i>. */ public DictionaryPageHeader(DictionaryPageHeader other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); this.num_values = other.num_values; if (other.isSetEncoding()) { this.encoding = other.encoding; } this.is_sorted = other.is_sorted; }
@Override public String toString() { StringBuilder sb = new StringBuilder("DictionaryPageHeader("); boolean first = true; sb.append("num_values:"); sb.append(this.num_values); first = false; if (!first) sb.append(", "); sb.append("encoding:"); if (this.encoding == null) { sb.append("null"); } else { sb.append(this.encoding); } first = false; if (isSetIs_sorted()) { if (!first) sb.append(", "); sb.append("is_sorted:"); sb.append(this.is_sorted); first = false; } sb.append(")"); return sb.toString(); }
public void setFieldValue(_Fields field, Object value) { switch (field) { case NUM_VALUES: if (value == null) { unsetNum_values(); } else { setNum_values((Integer)value); } break; case ENCODING: if (value == null) { unsetEncoding(); } else { setEncoding((Encoding)value); } break; case IS_SORTED: if (value == null) { unsetIs_sorted(); } else { setIs_sorted((Boolean)value); } break; } }
public Object getFieldValue(_Fields field) { switch (field) { case NUM_VALUES: return new Integer(getNum_values()); case ENCODING: return getEncoding(); case IS_SORTED: return new Boolean(isIs_sorted()); } throw new IllegalStateException(); }
if (field.type == TType.I32) { this.num_values = iprot.readI32(); setNum_valuesIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); if (field.type == TType.BOOL) { this.is_sorted = iprot.readBool(); setIs_sortedIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); if (!isSetNum_values()) { throw new TProtocolException("Required field 'num_values' was not found in serialized data! Struct: " + toString()); validate();
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case NUM_VALUES: return isSetNum_values(); case ENCODING: return isSetEncoding(); case IS_SORTED: return isSetIs_sorted(); } throw new IllegalStateException(); }
public boolean equals(DictionaryPageHeader that) { if (that == null) return false; boolean this_present_num_values = true; boolean that_present_num_values = true; if (this_present_num_values || that_present_num_values) { if (!(this_present_num_values && that_present_num_values)) return false; if (this.num_values != that.num_values) return false; } boolean this_present_encoding = true && this.isSetEncoding(); boolean that_present_encoding = true && that.isSetEncoding(); if (this_present_encoding || that_present_encoding) { if (!(this_present_encoding && that_present_encoding)) return false; if (!this.encoding.equals(that.encoding)) return false; } boolean this_present_is_sorted = true && this.isSetIs_sorted(); boolean that_present_is_sorted = true && that.isSetIs_sorted(); if (this_present_is_sorted || that_present_is_sorted) { if (!(this_present_is_sorted && that_present_is_sorted)) return false; if (this.is_sorted != that.is_sorted) return false; } return true; }
public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(NUM_VALUES_FIELD_DESC); oprot.writeI32(this.num_values); oprot.writeFieldEnd(); if (this.encoding != null) { oprot.writeFieldBegin(ENCODING_FIELD_DESC); oprot.writeI32(this.encoding.getValue()); oprot.writeFieldEnd(); } if (isSetIs_sorted()) { oprot.writeFieldBegin(IS_SORTED_FIELD_DESC); oprot.writeBool(this.is_sorted); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
case 7: // DICTIONARY_PAGE_HEADER if (field.type == TType.STRUCT) { this.dictionary_page_header = new DictionaryPageHeader(); this.dictionary_page_header.read(iprot); } else { TProtocolUtil.skip(iprot, field.type);