public BlockletInfo3 deepCopy() { return new BlockletInfo3(this); }
public Object getFieldValue(_Fields field) { switch (field) { case NUM_ROWS: return getNum_rows(); case COLUMN_DATA_CHUNKS_OFFSETS: return getColumn_data_chunks_offsets(); case COLUMN_DATA_CHUNKS_LENGTH: return getColumn_data_chunks_length(); case DIMENSION_OFFSETS: return getDimension_offsets(); case MEASURE_OFFSETS: return getMeasure_offsets(); case NUMBER_NUMBER_OF_PAGES: return getNumber_number_of_pages(); } throw new IllegalStateException(); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof BlockletInfo3) return this.equals((BlockletInfo3)that); return false; }
/** 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_ROWS: return isSetNum_rows(); case COLUMN_DATA_CHUNKS_OFFSETS: return isSetColumn_data_chunks_offsets(); case COLUMN_DATA_CHUNKS_LENGTH: return isSetColumn_data_chunks_length(); case DIMENSION_OFFSETS: return isSetDimension_offsets(); case MEASURE_OFFSETS: return isSetMeasure_offsets(); case NUMBER_NUMBER_OF_PAGES: return isSetNumber_number_of_pages(); } throw new IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public BlockletInfo3(BlockletInfo3 other) { __isset_bitfield = other.__isset_bitfield; this.num_rows = other.num_rows; if (other.isSetColumn_data_chunks_offsets()) { List<Long> __this__column_data_chunks_offsets = new ArrayList<Long>(other.column_data_chunks_offsets); this.column_data_chunks_offsets = __this__column_data_chunks_offsets; } if (other.isSetColumn_data_chunks_length()) { List<Integer> __this__column_data_chunks_length = new ArrayList<Integer>(other.column_data_chunks_length); this.column_data_chunks_length = __this__column_data_chunks_length; } this.dimension_offsets = other.dimension_offsets; this.measure_offsets = other.measure_offsets; this.number_number_of_pages = other.number_number_of_pages; }
case 5: // BLOCKLET_INFO if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.blocklet_info = new org.apache.carbondata.format.BlockletInfo3(); struct.blocklet_info.read(iprot); struct.setBlocklet_infoIsSet(true); } else {
lastComparison = Boolean.valueOf(isSetNum_rows()).compareTo(other.isSetNum_rows()); if (lastComparison != 0) { return lastComparison; if (isSetNum_rows()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_rows, other.num_rows); if (lastComparison != 0) { lastComparison = Boolean.valueOf(isSetColumn_data_chunks_offsets()).compareTo(other.isSetColumn_data_chunks_offsets()); if (lastComparison != 0) { return lastComparison; if (isSetColumn_data_chunks_offsets()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_data_chunks_offsets, other.column_data_chunks_offsets); if (lastComparison != 0) { lastComparison = Boolean.valueOf(isSetColumn_data_chunks_length()).compareTo(other.isSetColumn_data_chunks_length()); if (lastComparison != 0) { return lastComparison; if (isSetColumn_data_chunks_length()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_data_chunks_length, other.column_data_chunks_length); if (lastComparison != 0) { lastComparison = Boolean.valueOf(isSetDimension_offsets()).compareTo(other.isSetDimension_offsets()); if (lastComparison != 0) { return lastComparison; if (isSetDimension_offsets()) {
@Override public void read(org.apache.thrift.protocol.TProtocol prot, BlockIndex struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.num_rows = iprot.readI64(); struct.setNum_rowsIsSet(true); struct.file_name = iprot.readString(); struct.setFile_nameIsSet(true); struct.offset = iprot.readI64(); struct.setOffsetIsSet(true); struct.block_index = new org.apache.carbondata.format.BlockletIndex(); struct.block_index.read(iprot); struct.setBlock_indexIsSet(true); BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.blocklet_info = new org.apache.carbondata.format.BlockletInfo3(); struct.blocklet_info.read(iprot); struct.setBlocklet_infoIsSet(true); } if (incoming.get(1)) { struct.file_size = iprot.readI64(); struct.setFile_sizeIsSet(true); } } }
boolean this_present_column_data_chunks_offsets = true && this.isSetColumn_data_chunks_offsets(); boolean that_present_column_data_chunks_offsets = true && that.isSetColumn_data_chunks_offsets(); if (this_present_column_data_chunks_offsets || that_present_column_data_chunks_offsets) { if (!(this_present_column_data_chunks_offsets && that_present_column_data_chunks_offsets)) boolean this_present_column_data_chunks_length = true && this.isSetColumn_data_chunks_length(); boolean that_present_column_data_chunks_length = true && that.isSetColumn_data_chunks_length(); if (this_present_column_data_chunks_length || that_present_column_data_chunks_length) { if (!(this_present_column_data_chunks_length && that_present_column_data_chunks_length))
/** * Below method is to convert the blocklet info of the thrift to wrapper * blocklet info * * @param blockletInfoThrift blocklet info of the thrift * @return blocklet info wrapper */ public BlockletInfo getBlockletInfo( org.apache.carbondata.format.BlockletInfo3 blockletInfoThrift, int numberOfDimensionColumns) { BlockletInfo blockletInfo = new BlockletInfo(); List<Long> dimensionColumnChunkOffsets = blockletInfoThrift.getColumn_data_chunks_offsets().subList(0, numberOfDimensionColumns); List<Long> measureColumnChunksOffsets = blockletInfoThrift.getColumn_data_chunks_offsets() .subList(numberOfDimensionColumns, blockletInfoThrift.getColumn_data_chunks_offsets().size()); List<Integer> dimensionColumnChunkLength = blockletInfoThrift.getColumn_data_chunks_length().subList(0, numberOfDimensionColumns); List<Integer> measureColumnChunksLength = blockletInfoThrift.getColumn_data_chunks_length() .subList(numberOfDimensionColumns, blockletInfoThrift.getColumn_data_chunks_offsets().size()); blockletInfo.setDimensionChunkOffsets(dimensionColumnChunkOffsets); blockletInfo.setMeasureChunkOffsets(measureColumnChunksOffsets); blockletInfo.setDimensionChunksLength(dimensionColumnChunkLength); blockletInfo.setMeasureChunksLength(measureColumnChunksLength); blockletInfo.setNumberOfRows(blockletInfoThrift.getNum_rows()); blockletInfo.setDimensionOffset(blockletInfoThrift.getDimension_offsets()); blockletInfo.setMeasureOffsets(blockletInfoThrift.getMeasure_offsets()); blockletInfo.setNumberOfPages(blockletInfoThrift.getNumber_number_of_pages()); return blockletInfo; }
for (int _i173 = 0; _i173 < _list171.size; ++_i173) _elem172 = new BlockletInfo3(); _elem172.read(iprot); struct.blocklet_info_list3.add(_elem172);
List<BlockletInfo3> __this__blocklet_info_list3 = new ArrayList<BlockletInfo3>(other.blocklet_info_list3.size()); for (BlockletInfo3 other_element : other.blocklet_info_list3) { __this__blocklet_info_list3.add(new BlockletInfo3(other_element));
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_num_rows = true; list.add(present_num_rows); if (present_num_rows) list.add(num_rows); boolean present_column_data_chunks_offsets = true && (isSetColumn_data_chunks_offsets()); list.add(present_column_data_chunks_offsets); if (present_column_data_chunks_offsets) list.add(column_data_chunks_offsets); boolean present_column_data_chunks_length = true && (isSetColumn_data_chunks_length()); list.add(present_column_data_chunks_length); if (present_column_data_chunks_length) list.add(column_data_chunks_length); boolean present_dimension_offsets = true; list.add(present_dimension_offsets); if (present_dimension_offsets) list.add(dimension_offsets); boolean present_measure_offsets = true; list.add(present_measure_offsets); if (present_measure_offsets) list.add(measure_offsets); boolean present_number_number_of_pages = true; list.add(present_number_number_of_pages); if (present_number_number_of_pages) list.add(number_number_of_pages); return list.hashCode(); }
if (!(this_present_blocklet_info && that_present_blocklet_info)) return false; if (!this.blocklet_info.equals(that.blocklet_info)) return false;
for (int _i189 = 0; _i189 < _list187.size; ++_i189) _elem188 = new BlockletInfo3(); _elem188.read(iprot); struct.blocklet_info_list3.add(_elem188);
public static BlockletInfo3 getBlocletInfo3( org.apache.carbondata.core.metadata.blocklet.BlockletInfo blockletInfo) { List<Long> dimensionChunkOffsets = blockletInfo.getDimensionChunkOffsets(); dimensionChunkOffsets.addAll(blockletInfo.getMeasureChunkOffsets()); List<Integer> dimensionChunksLength = blockletInfo.getDimensionChunksLength(); dimensionChunksLength.addAll(blockletInfo.getMeasureChunksLength()); return new BlockletInfo3(blockletInfo.getNumberOfRows(), dimensionChunkOffsets, dimensionChunksLength, blockletInfo.getDimensionOffset(), blockletInfo.getMeasureOffsets(), blockletInfo.getNumberOfPages()); }
/** * Performs a deep copy on <i>other</i>. */ public BlockIndex(BlockIndex other) { __isset_bitfield = other.__isset_bitfield; this.num_rows = other.num_rows; if (other.isSetFile_name()) { this.file_name = other.file_name; } this.offset = other.offset; if (other.isSetBlock_index()) { this.block_index = new org.apache.carbondata.format.BlockletIndex(other.block_index); } if (other.isSetBlocklet_info()) { this.blocklet_info = new org.apache.carbondata.format.BlockletInfo3(other.blocklet_info); } this.file_size = other.file_size; }
encodedBlocklet, model.getSegmentProperties().getMeasures())); BlockletInfo3 blockletInfo3 = new BlockletInfo3(encodedBlocklet.getBlockletSize(), currentDataChunksOffset, currentDataChunksLength, dimensionOffset, measureOffset, encodedBlocklet.getNumberOfPages());