public ColumnMetaData deepCopy() { return new ColumnMetaData(this); }
public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TYPE: return getType(); return getEncodings(); return getPath_in_schema(); return getCodec(); return getNum_values(); return getTotal_uncompressed_size(); return getTotal_compressed_size(); return getKey_value_metadata(); return getData_page_offset(); return getIndex_page_offset(); return getDictionary_page_offset(); return getStatistics(); return getEncoding_stats(); return getBloom_filter_offset();
return isSetType(); case ENCODINGS: return isSetEncodings(); case PATH_IN_SCHEMA: return isSetPath_in_schema(); case CODEC: return isSetCodec(); case NUM_VALUES: return isSetNum_values(); case TOTAL_UNCOMPRESSED_SIZE: return isSetTotal_uncompressed_size(); case TOTAL_COMPRESSED_SIZE: return isSetTotal_compressed_size(); case KEY_VALUE_METADATA: return isSetKey_value_metadata(); case DATA_PAGE_OFFSET: return isSetData_page_offset(); case INDEX_PAGE_OFFSET: return isSetIndex_page_offset(); case DICTIONARY_PAGE_OFFSET: return isSetDictionary_page_offset(); case STATISTICS: return isSetStatistics(); case ENCODING_STATS: return isSetEncoding_stats();
static long getOffset(ColumnChunk columnChunk) { ColumnMetaData md = columnChunk.getMeta_data(); long offset = md.getData_page_offset(); if (md.isSetDictionary_page_offset() && offset > md.getDictionary_page_offset()) { offset = md.getDictionary_page_offset(); } return offset; }
case TYPE: if (value == null) { unsetType(); } else { setType((Type)value); unsetEncodings(); } else { setEncodings((java.util.List<Encoding>)value); unsetPath_in_schema(); } else { setPath_in_schema((java.util.List<java.lang.String>)value); unsetCodec(); } else { setCodec((CompressionCodec)value); unsetNum_values(); } else { setNum_values((java.lang.Long)value); unsetTotal_uncompressed_size(); } else { setTotal_uncompressed_size((java.lang.Long)value); unsetTotal_compressed_size(); } else { setTotal_compressed_size((java.lang.Long)value);
boolean this_present_type = true && this.isSetType(); boolean that_present_type = true && that.isSetType(); if (this_present_type || that_present_type) { if (!(this_present_type && that_present_type)) boolean this_present_encodings = true && this.isSetEncodings(); boolean that_present_encodings = true && that.isSetEncodings(); if (this_present_encodings || that_present_encodings) { if (!(this_present_encodings && that_present_encodings)) boolean this_present_path_in_schema = true && this.isSetPath_in_schema(); boolean that_present_path_in_schema = true && that.isSetPath_in_schema(); if (this_present_path_in_schema || that_present_path_in_schema) { if (!(this_present_path_in_schema && that_present_path_in_schema)) boolean this_present_codec = true && this.isSetCodec(); boolean that_present_codec = true && that.isSetCodec(); if (this_present_codec || that_present_codec) { if (!(this_present_codec && that_present_codec)) boolean this_present_key_value_metadata = true && this.isSetKey_value_metadata(); boolean that_present_key_value_metadata = true && that.isSetKey_value_metadata(); if (this_present_key_value_metadata || that_present_key_value_metadata) { if (!(this_present_key_value_metadata && that_present_key_value_metadata)) boolean this_present_index_page_offset = true && this.isSetIndex_page_offset(); boolean that_present_index_page_offset = true && that.isSetIndex_page_offset(); if (this_present_index_page_offset || that_present_index_page_offset) { if (!(this_present_index_page_offset && that_present_index_page_offset))
sb.append(this.total_compressed_size); first = false; if (isSetKey_value_metadata()) { if (!first) sb.append(", "); sb.append("key_value_metadata:"); sb.append(this.data_page_offset); first = false; if (isSetIndex_page_offset()) { if (!first) sb.append(", "); sb.append("index_page_offset:"); first = false; if (isSetDictionary_page_offset()) { if (!first) sb.append(", "); sb.append("dictionary_page_offset:"); first = false; if (isSetStatistics()) { if (!first) sb.append(", "); sb.append("statistics:"); if (isSetEncoding_stats()) { if (!first) sb.append(", "); sb.append("encoding_stats:");
ColumnChunk columnChunk = new ColumnChunk(columnMetaData.getFirstDataPageOffset()); // verify this is the right offset columnChunk.meta_data = new ColumnMetaData( getType(columnMetaData.getType()), toFormatEncodings(columnMetaData.getEncodings()), columnChunk.meta_data.dictionary_page_offset = columnMetaData.getDictionaryPageOffset(); if (!columnMetaData.getStatistics().isEmpty()) { columnChunk.meta_data.setStatistics(toParquetStatistics(columnMetaData.getStatistics())); columnChunk.meta_data.setEncoding_stats(convertEncodingStats(columnMetaData.getEncodingStats()));
struct.meta_data = new ColumnMetaData(); struct.meta_data.read(iprot); struct.setMeta_dataIsSet(true);
static FileMetaData filterFileMetaDataByMidpoint(FileMetaData metaData, RangeMetadataFilter filter) { List<RowGroup> rowGroups = metaData.getRow_groups(); List<RowGroup> newRowGroups = new ArrayList<RowGroup>(); for (RowGroup rowGroup : rowGroups) { long totalSize = 0; long startIndex = getOffset(rowGroup.getColumns().get(0)); for (ColumnChunk col : rowGroup.getColumns()) { totalSize += col.getMeta_data().getTotal_compressed_size(); } long midPoint = startIndex + totalSize / 2; if (filter.contains(midPoint)) { newRowGroups.add(rowGroup); } } metaData.setRow_groups(newRowGroups); return metaData; }
messageType.getType(path.toArray()).asPrimitiveType(), fromFormatCodec(metaData.codec), convertEncodingStats(metaData.getEncoding_stats()), fromFormatEncodings(metaData.encodings), fromParquetStatistics(
@Override public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof ColumnMetaData) return this.equals((ColumnMetaData)that); return false; }
case TYPE: if (value == null) { unsetType(); } else { setType((Type)value); unsetEncodings(); } else { setEncodings((List<Encoding>)value); unsetPath_in_schema(); } else { setPath_in_schema((List<String>)value); unsetCodec(); } else { setCodec((CompressionCodec)value); unsetNum_values(); } else { setNum_values((Long)value); unsetTotal_uncompressed_size(); } else { setTotal_uncompressed_size((Long)value); unsetTotal_compressed_size(); } else { setTotal_compressed_size((Long)value);
hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287); if (isSetType()) hashCode = hashCode * 8191 + type.getValue(); hashCode = hashCode * 8191 + ((isSetEncodings()) ? 131071 : 524287); if (isSetEncodings()) hashCode = hashCode * 8191 + encodings.hashCode(); hashCode = hashCode * 8191 + ((isSetPath_in_schema()) ? 131071 : 524287); if (isSetPath_in_schema()) hashCode = hashCode * 8191 + path_in_schema.hashCode(); hashCode = hashCode * 8191 + ((isSetCodec()) ? 131071 : 524287); if (isSetCodec()) hashCode = hashCode * 8191 + codec.getValue(); hashCode = hashCode * 8191 + ((isSetKey_value_metadata()) ? 131071 : 524287); if (isSetKey_value_metadata()) hashCode = hashCode * 8191 + key_value_metadata.hashCode(); hashCode = hashCode * 8191 + ((isSetIndex_page_offset()) ? 131071 : 524287); if (isSetIndex_page_offset()) hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(index_page_offset); hashCode = hashCode * 8191 + ((isSetDictionary_page_offset()) ? 131071 : 524287); if (isSetDictionary_page_offset()) hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(dictionary_page_offset); hashCode = hashCode * 8191 + ((isSetStatistics()) ? 131071 : 524287);
sb.append(this.total_compressed_size); first = false; if (isSetKey_value_metadata()) { if (!first) sb.append(", "); sb.append("key_value_metadata:"); sb.append(this.data_page_offset); first = false; if (isSetIndex_page_offset()) { if (!first) sb.append(", "); sb.append("index_page_offset:"); if (isSetDictionary_page_offset()) { if (!first) sb.append(", "); sb.append("dictionary_page_offset:"); if (isSetStatistics()) { if (!first) sb.append(", "); sb.append("statistics:"); if (isSetEncoding_stats()) { if (!first) sb.append(", "); sb.append("encoding_stats:"); if (isSetBloom_filter_offset()) { if (!first) sb.append(", "); sb.append("bloom_filter_offset:");
static long getOffset(ColumnChunk columnChunk) { ColumnMetaData md = columnChunk.getMeta_data(); long offset = md.getData_page_offset(); if (md.isSetDictionary_page_offset() && offset > md.getDictionary_page_offset()) { offset = md.getDictionary_page_offset(); } return offset; }
ColumnChunk columnChunk = new ColumnChunk(columnMetaData.getFirstDataPageOffset()); // verify this is the right offset columnChunk.meta_data = new ColumnMetaData( getType(columnMetaData.getType()), toFormatEncodings(columnMetaData.getEncodings()), columnChunk.meta_data.dictionary_page_offset = columnMetaData.getDictionaryPageOffset(); if (!columnMetaData.getStatistics().isEmpty()) { columnChunk.meta_data.setStatistics(toParquetStatistics(columnMetaData.getStatistics())); columnChunk.meta_data.setEncoding_stats(convertEncodingStats(columnMetaData.getEncodingStats()));
struct.meta_data = new ColumnMetaData(); struct.meta_data.read(iprot); struct.setMeta_dataIsSet(true);
static FileMetaData filterFileMetaDataByMidpoint(FileMetaData metaData, RangeMetadataFilter filter) { List<RowGroup> rowGroups = metaData.getRow_groups(); List<RowGroup> newRowGroups = new ArrayList<RowGroup>(); for (RowGroup rowGroup : rowGroups) { long totalSize = 0; long startIndex = getOffset(rowGroup.getColumns().get(0)); for (ColumnChunk col : rowGroup.getColumns()) { totalSize += col.getMeta_data().getTotal_compressed_size(); } long midPoint = startIndex + totalSize / 2; if (filter.contains(midPoint)) { newRowGroups.add(rowGroup); } } metaData.setRow_groups(newRowGroups); return metaData; }
messageType.getType(path.toArray()).asPrimitiveType(), fromFormatCodec(metaData.codec), convertEncodingStats(metaData.getEncoding_stats()), fromFormatEncodings(metaData.encodings), fromParquetStatistics(