public Object getFieldValue(_Fields field) { switch (field) { case NUM_VALUES: return getNum_values(); case ENCODING: return getEncoding(); case IS_SORTED: return isIs_sorted(); } throw new IllegalStateException(); }
public DictionaryPageHeader deepCopy() { return new DictionaryPageHeader(this); }
@Override public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof DictionaryPageHeader) return this.equals((DictionaryPageHeader)that); return false; }
@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + num_values; hashCode = hashCode * 8191 + ((isSetEncoding()) ? 131071 : 524287); if (isSetEncoding()) hashCode = hashCode * 8191 + encoding.getValue(); hashCode = hashCode * 8191 + ((isSetIs_sorted()) ? 131071 : 524287); if (isSetIs_sorted()) hashCode = hashCode * 8191 + ((is_sorted) ? 131071 : 524287); return hashCode; }
/** 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 NUM_VALUES: return isSetNum_values(); case ENCODING: return isSetEncoding(); case IS_SORTED: return isSetIs_sorted(); } throw new IllegalStateException(); }
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()))); }
if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.num_values = iprot.readI32(); struct.setNum_valuesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.encoding = org.apache.parquet.format.Encoding.findByValue(iprot.readI32()); struct.setEncodingIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.is_sorted = iprot.readBool(); struct.setIs_sortedIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (!struct.isSetNum_values()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'num_values' was not found in serialized data! Struct: " + toString()); struct.validate();
private DictionaryPage readDictionaryPageHelper(PageHeader pageHeader) throws IOException { ByteBuffer data = uncompressPage(pageHeader, false); return new DictionaryPage( BytesInput.from(data, 0, pageHeader.uncompressed_page_size), pageHeader.getDictionary_page_header().getNum_values(), parquetMetadataConverter.getEncoding(pageHeader.dictionary_page_header.encoding) ); }
struct.dictionary_page_header = new DictionaryPageHeader(); struct.dictionary_page_header.read(iprot); struct.setDictionary_page_headerIsSet(true);
public void write(org.apache.thrift.protocol.TProtocol oprot, DictionaryPageHeader struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(NUM_VALUES_FIELD_DESC); oprot.writeI32(struct.num_values); oprot.writeFieldEnd(); if (struct.encoding != null) { oprot.writeFieldBegin(ENCODING_FIELD_DESC); oprot.writeI32(struct.encoding.getValue()); oprot.writeFieldEnd(); } if (struct.isSetIs_sorted()) { oprot.writeFieldBegin(IS_SORTED_FIELD_DESC); oprot.writeBool(struct.is_sorted); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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(); }
/** * Performs a deep copy on <i>other</i>. */ public DictionaryPageHeader(DictionaryPageHeader other) { __isset_bitfield = other.__isset_bitfield; this.num_values = other.num_values; if (other.isSetEncoding()) { this.encoding = other.encoding; } this.is_sorted = other.is_sorted; }
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()))); }
if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.num_values = iprot.readI32(); struct.setNum_valuesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.encoding = org.apache.parquet.format.Encoding.findByValue(iprot.readI32()); struct.setEncodingIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.is_sorted = iprot.readBool(); struct.setIs_sortedIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (!struct.isSetNum_values()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'num_values' was not found in serialized data! Struct: " + toString()); struct.validate();
new DictionaryPage( decompressor.decompress(BytesInput.from(in, pageHeader.compressed_page_size), pageHeader.getUncompressed_page_size()), pageHeader.getDictionary_page_header().getNum_values(), parquetMetadataConverter.getEncoding(pageHeader.dictionary_page_header.encoding) );
/** 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 java.lang.IllegalArgumentException(); } switch (field) { case NUM_VALUES: return isSetNum_values(); case ENCODING: return isSetEncoding(); case IS_SORTED: return isSetIs_sorted(); } throw new java.lang.IllegalStateException(); }
struct.dictionary_page_header = new DictionaryPageHeader(); struct.dictionary_page_header.read(iprot); struct.setDictionary_page_headerIsSet(true);
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)) 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))
public void write(org.apache.thrift.protocol.TProtocol oprot, DictionaryPageHeader struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(NUM_VALUES_FIELD_DESC); oprot.writeI32(struct.num_values); oprot.writeFieldEnd(); if (struct.encoding != null) { oprot.writeFieldBegin(ENCODING_FIELD_DESC); oprot.writeI32(struct.encoding.getValue()); oprot.writeFieldEnd(); } if (struct.isSetIs_sorted()) { oprot.writeFieldBegin(IS_SORTED_FIELD_DESC); oprot.writeBool(struct.is_sorted); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@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(); }