if (isSetDictionary_page_header()) { if (!first) sb.append(", "); sb.append("dictionary_page_header:");
list.add(index_page_header); boolean present_dictionary_page_header = true && (isSetDictionary_page_header()); list.add(present_dictionary_page_header); if (present_dictionary_page_header)
if (isSetDictionary_page_header()) { if (!first) sb.append(", "); sb.append("dictionary_page_header:");
/** 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 TYPE: return isSetType(); case UNCOMPRESSED_PAGE_SIZE: return isSetUncompressed_page_size(); case COMPRESSED_PAGE_SIZE: return isSetCompressed_page_size(); case CRC: return isSetCrc(); case DATA_PAGE_HEADER: return isSetData_page_header(); case INDEX_PAGE_HEADER: return isSetIndex_page_header(); case DICTIONARY_PAGE_HEADER: return isSetDictionary_page_header(); case DATA_PAGE_HEADER_V2: return isSetData_page_header_v2(); } throw new IllegalStateException(); }
lastComparison = Boolean.valueOf(isSetDictionary_page_header()).compareTo(other.isSetDictionary_page_header()); if (lastComparison != 0) { return lastComparison; if (isSetDictionary_page_header()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dictionary_page_header, other.dictionary_page_header); if (lastComparison != 0) {
lastComparison = java.lang.Boolean.valueOf(isSetDictionary_page_header()).compareTo(other.isSetDictionary_page_header()); if (lastComparison != 0) { return lastComparison; if (isSetDictionary_page_header()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dictionary_page_header, other.dictionary_page_header); if (lastComparison != 0) {
/** 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 TYPE: return isSetType(); case UNCOMPRESSED_PAGE_SIZE: return isSetUncompressed_page_size(); case COMPRESSED_PAGE_SIZE: return isSetCompressed_page_size(); case CRC: return isSetCrc(); case DATA_PAGE_HEADER: return isSetData_page_header(); case INDEX_PAGE_HEADER: return isSetIndex_page_header(); case DICTIONARY_PAGE_HEADER: return isSetDictionary_page_header(); case DATA_PAGE_HEADER_V2: return isSetData_page_header_v2(); case BLOOM_FILTER_PAGE_HEADER: return isSetBloom_filter_page_header(); } throw new java.lang.IllegalStateException(); }
optionals.set(2); if (struct.isSetDictionary_page_header()) { optionals.set(3); struct.index_page_header.write(oprot); if (struct.isSetDictionary_page_header()) { struct.dictionary_page_header.write(oprot);
optionals.set(2); if (struct.isSetDictionary_page_header()) { optionals.set(3); struct.index_page_header.write(oprot); if (struct.isSetDictionary_page_header()) { struct.dictionary_page_header.write(oprot);
/** * Performs a deep copy on <i>other</i>. */ public PageHeader(PageHeader other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetType()) { this.type = other.type; } this.uncompressed_page_size = other.uncompressed_page_size; this.compressed_page_size = other.compressed_page_size; this.crc = other.crc; if (other.isSetData_page_header()) { this.data_page_header = new DataPageHeader(other.data_page_header); } if (other.isSetIndex_page_header()) { this.index_page_header = new IndexPageHeader(other.index_page_header); } if (other.isSetDictionary_page_header()) { this.dictionary_page_header = new DictionaryPageHeader(other.dictionary_page_header); } if (other.isSetData_page_header_v2()) { this.data_page_header_v2 = new DataPageHeaderV2(other.data_page_header_v2); } }
@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287); if (isSetType()) hashCode = hashCode * 8191 + type.getValue(); hashCode = hashCode * 8191 + uncompressed_page_size; hashCode = hashCode * 8191 + compressed_page_size; hashCode = hashCode * 8191 + ((isSetCrc()) ? 131071 : 524287); if (isSetCrc()) hashCode = hashCode * 8191 + crc; hashCode = hashCode * 8191 + ((isSetData_page_header()) ? 131071 : 524287); if (isSetData_page_header()) hashCode = hashCode * 8191 + data_page_header.hashCode(); hashCode = hashCode * 8191 + ((isSetIndex_page_header()) ? 131071 : 524287); if (isSetIndex_page_header()) hashCode = hashCode * 8191 + index_page_header.hashCode(); hashCode = hashCode * 8191 + ((isSetDictionary_page_header()) ? 131071 : 524287); if (isSetDictionary_page_header()) hashCode = hashCode * 8191 + dictionary_page_header.hashCode(); hashCode = hashCode * 8191 + ((isSetData_page_header_v2()) ? 131071 : 524287); if (isSetData_page_header_v2()) hashCode = hashCode * 8191 + data_page_header_v2.hashCode(); hashCode = hashCode * 8191 + ((isSetBloom_filter_page_header()) ? 131071 : 524287); if (isSetBloom_filter_page_header()) hashCode = hashCode * 8191 + bloom_filter_page_header.hashCode(); return hashCode; }
/** * Reads and decompresses a dictionary page for the given column chunk. * * Returns null if the given column chunk has no dictionary page. * * @param meta a column's ColumnChunkMetaData to read the dictionary from * @return an uncompressed DictionaryPage or null * @throws IOException if there is an error while reading the dictionary */ DictionaryPage readDictionary(ColumnChunkMetaData meta) throws IOException { if (!meta.getEncodings().contains(Encoding.PLAIN_DICTIONARY) && !meta.getEncodings().contains(Encoding.RLE_DICTIONARY)) { return null; } // TODO: this should use getDictionaryPageOffset() but it isn't reliable. if (f.getPos() != meta.getStartingPos()) { f.seek(meta.getStartingPos()); } PageHeader pageHeader = Util.readPageHeader(f); if (!pageHeader.isSetDictionary_page_header()) { return null; // TODO: should this complain? } DictionaryPage compressedPage = readCompressedDictionary(pageHeader, f); BytesInputDecompressor decompressor = options.getCodecFactory().getDecompressor(meta.getCodec()); return new DictionaryPage( decompressor.decompress(compressedPage.getBytes(), compressedPage.getUncompressedSize()), compressedPage.getDictionarySize(), compressedPage.getEncoding()); }
/** * Reads and decompresses a dictionary page for the given column chunk. * * Returns null if the given column chunk has no dictionary page. * * @param meta a column's ColumnChunkMetaData to read the dictionary from * @return an uncompressed DictionaryPage or null * @throws IOException if there is an error while reading the dictionary */ DictionaryPage readDictionary(ColumnChunkMetaData meta) throws IOException { if (!meta.getEncodings().contains(Encoding.PLAIN_DICTIONARY) && !meta.getEncodings().contains(Encoding.RLE_DICTIONARY)) { return null; } // TODO: this should use getDictionaryPageOffset() but it isn't reliable. if (f.getPos() != meta.getStartingPos()) { f.seek(meta.getStartingPos()); } PageHeader pageHeader = Util.readPageHeader(f); if (!pageHeader.isSetDictionary_page_header()) { return null; // TODO: should this complain? } DictionaryPage compressedPage = readCompressedDictionary(pageHeader, f); BytesInputDecompressor decompressor = options.getCodecFactory().getDecompressor(meta.getCodec()); return new DictionaryPage( decompressor.decompress(compressedPage.getBytes(), compressedPage.getUncompressedSize()), compressedPage.getDictionarySize(), compressedPage.getEncoding()); }
boolean this_present_dictionary_page_header = true && this.isSetDictionary_page_header(); boolean that_present_dictionary_page_header = true && that.isSetDictionary_page_header(); if (this_present_dictionary_page_header || that_present_dictionary_page_header) { if (!(this_present_dictionary_page_header && that_present_dictionary_page_header))
/** * Performs a deep copy on <i>other</i>. */ public PageHeader(PageHeader other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetType()) { this.type = other.type; } this.uncompressed_page_size = other.uncompressed_page_size; this.compressed_page_size = other.compressed_page_size; this.crc = other.crc; if (other.isSetData_page_header()) { this.data_page_header = new DataPageHeader(other.data_page_header); } if (other.isSetIndex_page_header()) { this.index_page_header = new IndexPageHeader(other.index_page_header); } if (other.isSetDictionary_page_header()) { this.dictionary_page_header = new DictionaryPageHeader(other.dictionary_page_header); } if (other.isSetData_page_header_v2()) { this.data_page_header_v2 = new DataPageHeaderV2(other.data_page_header_v2); } if (other.isSetBloom_filter_page_header()) { this.bloom_filter_page_header = new BloomFilterPageHeader(other.bloom_filter_page_header); } }
boolean this_present_dictionary_page_header = true && this.isSetDictionary_page_header(); boolean that_present_dictionary_page_header = true && that.isSetDictionary_page_header(); if (this_present_dictionary_page_header || that_present_dictionary_page_header) { if (!(this_present_dictionary_page_header && that_present_dictionary_page_header))
if (struct.isSetDictionary_page_header()) { oprot.writeFieldBegin(DICTIONARY_PAGE_HEADER_FIELD_DESC); struct.dictionary_page_header.write(oprot);
if (struct.isSetDictionary_page_header()) { oprot.writeFieldBegin(DICTIONARY_PAGE_HEADER_FIELD_DESC); struct.dictionary_page_header.write(oprot);