![JAR search and dependency download from the Maven repository](/logo.png)
org.apache.parquet.format.ColumnMetaData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of parquet-format Show documentation
Show all versions of parquet-format Show documentation
Parquet is a columnar storage format that supports nested data. This provides all generated metadata code.
/**
* Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.parquet.format;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* Description for column metadata
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2017-10-17")
public class ColumnMetaData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnMetaData");
private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField ENCODINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("encodings", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField PATH_IN_SCHEMA_FIELD_DESC = new org.apache.thrift.protocol.TField("path_in_schema", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField CODEC_FIELD_DESC = new org.apache.thrift.protocol.TField("codec", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField NUM_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("num_values", org.apache.thrift.protocol.TType.I64, (short)5);
private static final org.apache.thrift.protocol.TField TOTAL_UNCOMPRESSED_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("total_uncompressed_size", org.apache.thrift.protocol.TType.I64, (short)6);
private static final org.apache.thrift.protocol.TField TOTAL_COMPRESSED_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("total_compressed_size", org.apache.thrift.protocol.TType.I64, (short)7);
private static final org.apache.thrift.protocol.TField KEY_VALUE_METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("key_value_metadata", org.apache.thrift.protocol.TType.LIST, (short)8);
private static final org.apache.thrift.protocol.TField DATA_PAGE_OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("data_page_offset", org.apache.thrift.protocol.TType.I64, (short)9);
private static final org.apache.thrift.protocol.TField INDEX_PAGE_OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("index_page_offset", org.apache.thrift.protocol.TType.I64, (short)10);
private static final org.apache.thrift.protocol.TField DICTIONARY_PAGE_OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("dictionary_page_offset", org.apache.thrift.protocol.TType.I64, (short)11);
private static final org.apache.thrift.protocol.TField STATISTICS_FIELD_DESC = new org.apache.thrift.protocol.TField("statistics", org.apache.thrift.protocol.TType.STRUCT, (short)12);
private static final org.apache.thrift.protocol.TField ENCODING_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("encoding_stats", org.apache.thrift.protocol.TType.LIST, (short)13);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new ColumnMetaDataStandardSchemeFactory());
schemes.put(TupleScheme.class, new ColumnMetaDataTupleSchemeFactory());
}
/**
* Type of this column *
*
* @see Type
*/
public Type type; // required
/**
* Set of all encodings used for this column. The purpose is to validate
* whether we can decode those pages. *
*/
public List encodings; // required
/**
* Path in schema *
*/
public List path_in_schema; // required
/**
* Compression codec *
*
* @see CompressionCodec
*/
public CompressionCodec codec; // required
/**
* Number of values in this column *
*/
public long num_values; // required
/**
* total byte size of all uncompressed pages in this column chunk (including the headers) *
*/
public long total_uncompressed_size; // required
/**
* total byte size of all compressed pages in this column chunk (including the headers) *
*/
public long total_compressed_size; // required
/**
* Optional key/value metadata *
*/
public List key_value_metadata; // optional
/**
* Byte offset from beginning of file to first data page *
*/
public long data_page_offset; // required
/**
* Byte offset from beginning of file to root index page *
*/
public long index_page_offset; // optional
/**
* Byte offset from the beginning of file to first (only) dictionary page *
*/
public long dictionary_page_offset; // optional
/**
* optional statistics for this column chunk
*/
public Statistics statistics; // optional
/**
* Set of all encodings used for pages in this column chunk.
* This information can be used to determine if all data pages are
* dictionary encoded for example *
*/
public List encoding_stats; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* Type of this column *
*
* @see Type
*/
TYPE((short)1, "type"),
/**
* Set of all encodings used for this column. The purpose is to validate
* whether we can decode those pages. *
*/
ENCODINGS((short)2, "encodings"),
/**
* Path in schema *
*/
PATH_IN_SCHEMA((short)3, "path_in_schema"),
/**
* Compression codec *
*
* @see CompressionCodec
*/
CODEC((short)4, "codec"),
/**
* Number of values in this column *
*/
NUM_VALUES((short)5, "num_values"),
/**
* total byte size of all uncompressed pages in this column chunk (including the headers) *
*/
TOTAL_UNCOMPRESSED_SIZE((short)6, "total_uncompressed_size"),
/**
* total byte size of all compressed pages in this column chunk (including the headers) *
*/
TOTAL_COMPRESSED_SIZE((short)7, "total_compressed_size"),
/**
* Optional key/value metadata *
*/
KEY_VALUE_METADATA((short)8, "key_value_metadata"),
/**
* Byte offset from beginning of file to first data page *
*/
DATA_PAGE_OFFSET((short)9, "data_page_offset"),
/**
* Byte offset from beginning of file to root index page *
*/
INDEX_PAGE_OFFSET((short)10, "index_page_offset"),
/**
* Byte offset from the beginning of file to first (only) dictionary page *
*/
DICTIONARY_PAGE_OFFSET((short)11, "dictionary_page_offset"),
/**
* optional statistics for this column chunk
*/
STATISTICS((short)12, "statistics"),
/**
* Set of all encodings used for pages in this column chunk.
* This information can be used to determine if all data pages are
* dictionary encoded for example *
*/
ENCODING_STATS((short)13, "encoding_stats");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TYPE
return TYPE;
case 2: // ENCODINGS
return ENCODINGS;
case 3: // PATH_IN_SCHEMA
return PATH_IN_SCHEMA;
case 4: // CODEC
return CODEC;
case 5: // NUM_VALUES
return NUM_VALUES;
case 6: // TOTAL_UNCOMPRESSED_SIZE
return TOTAL_UNCOMPRESSED_SIZE;
case 7: // TOTAL_COMPRESSED_SIZE
return TOTAL_COMPRESSED_SIZE;
case 8: // KEY_VALUE_METADATA
return KEY_VALUE_METADATA;
case 9: // DATA_PAGE_OFFSET
return DATA_PAGE_OFFSET;
case 10: // INDEX_PAGE_OFFSET
return INDEX_PAGE_OFFSET;
case 11: // DICTIONARY_PAGE_OFFSET
return DICTIONARY_PAGE_OFFSET;
case 12: // STATISTICS
return STATISTICS;
case 13: // ENCODING_STATS
return ENCODING_STATS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __NUM_VALUES_ISSET_ID = 0;
private static final int __TOTAL_UNCOMPRESSED_SIZE_ISSET_ID = 1;
private static final int __TOTAL_COMPRESSED_SIZE_ISSET_ID = 2;
private static final int __DATA_PAGE_OFFSET_ISSET_ID = 3;
private static final int __INDEX_PAGE_OFFSET_ISSET_ID = 4;
private static final int __DICTIONARY_PAGE_OFFSET_ISSET_ID = 5;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.KEY_VALUE_METADATA,_Fields.INDEX_PAGE_OFFSET,_Fields.DICTIONARY_PAGE_OFFSET,_Fields.STATISTICS,_Fields.ENCODING_STATS};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, Type.class)));
tmpMap.put(_Fields.ENCODINGS, new org.apache.thrift.meta_data.FieldMetaData("encodings", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, Encoding.class))));
tmpMap.put(_Fields.PATH_IN_SCHEMA, new org.apache.thrift.meta_data.FieldMetaData("path_in_schema", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.CODEC, new org.apache.thrift.meta_data.FieldMetaData("codec", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CompressionCodec.class)));
tmpMap.put(_Fields.NUM_VALUES, new org.apache.thrift.meta_data.FieldMetaData("num_values", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.TOTAL_UNCOMPRESSED_SIZE, new org.apache.thrift.meta_data.FieldMetaData("total_uncompressed_size", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.TOTAL_COMPRESSED_SIZE, new org.apache.thrift.meta_data.FieldMetaData("total_compressed_size", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.KEY_VALUE_METADATA, new org.apache.thrift.meta_data.FieldMetaData("key_value_metadata", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, KeyValue.class))));
tmpMap.put(_Fields.DATA_PAGE_OFFSET, new org.apache.thrift.meta_data.FieldMetaData("data_page_offset", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.INDEX_PAGE_OFFSET, new org.apache.thrift.meta_data.FieldMetaData("index_page_offset", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.DICTIONARY_PAGE_OFFSET, new org.apache.thrift.meta_data.FieldMetaData("dictionary_page_offset", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.STATISTICS, new org.apache.thrift.meta_data.FieldMetaData("statistics", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Statistics.class)));
tmpMap.put(_Fields.ENCODING_STATS, new org.apache.thrift.meta_data.FieldMetaData("encoding_stats", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PageEncodingStats.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnMetaData.class, metaDataMap);
}
public ColumnMetaData() {
}
public ColumnMetaData(
Type type,
List encodings,
List path_in_schema,
CompressionCodec codec,
long num_values,
long total_uncompressed_size,
long total_compressed_size,
long data_page_offset)
{
this();
this.type = type;
this.encodings = encodings;
this.path_in_schema = path_in_schema;
this.codec = codec;
this.num_values = num_values;
setNum_valuesIsSet(true);
this.total_uncompressed_size = total_uncompressed_size;
setTotal_uncompressed_sizeIsSet(true);
this.total_compressed_size = total_compressed_size;
setTotal_compressed_sizeIsSet(true);
this.data_page_offset = data_page_offset;
setData_page_offsetIsSet(true);
}
/**
* Performs a deep copy on other.
*/
public ColumnMetaData(ColumnMetaData other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetType()) {
this.type = other.type;
}
if (other.isSetEncodings()) {
List __this__encodings = new ArrayList(other.encodings.size());
for (Encoding other_element : other.encodings) {
__this__encodings.add(other_element);
}
this.encodings = __this__encodings;
}
if (other.isSetPath_in_schema()) {
List __this__path_in_schema = new ArrayList(other.path_in_schema);
this.path_in_schema = __this__path_in_schema;
}
if (other.isSetCodec()) {
this.codec = other.codec;
}
this.num_values = other.num_values;
this.total_uncompressed_size = other.total_uncompressed_size;
this.total_compressed_size = other.total_compressed_size;
if (other.isSetKey_value_metadata()) {
List __this__key_value_metadata = new ArrayList(other.key_value_metadata.size());
for (KeyValue other_element : other.key_value_metadata) {
__this__key_value_metadata.add(new KeyValue(other_element));
}
this.key_value_metadata = __this__key_value_metadata;
}
this.data_page_offset = other.data_page_offset;
this.index_page_offset = other.index_page_offset;
this.dictionary_page_offset = other.dictionary_page_offset;
if (other.isSetStatistics()) {
this.statistics = new Statistics(other.statistics);
}
if (other.isSetEncoding_stats()) {
List __this__encoding_stats = new ArrayList(other.encoding_stats.size());
for (PageEncodingStats other_element : other.encoding_stats) {
__this__encoding_stats.add(new PageEncodingStats(other_element));
}
this.encoding_stats = __this__encoding_stats;
}
}
public ColumnMetaData deepCopy() {
return new ColumnMetaData(this);
}
@Override
public void clear() {
this.type = null;
this.encodings = null;
this.path_in_schema = null;
this.codec = null;
setNum_valuesIsSet(false);
this.num_values = 0;
setTotal_uncompressed_sizeIsSet(false);
this.total_uncompressed_size = 0;
setTotal_compressed_sizeIsSet(false);
this.total_compressed_size = 0;
this.key_value_metadata = null;
setData_page_offsetIsSet(false);
this.data_page_offset = 0;
setIndex_page_offsetIsSet(false);
this.index_page_offset = 0;
setDictionary_page_offsetIsSet(false);
this.dictionary_page_offset = 0;
this.statistics = null;
this.encoding_stats = null;
}
/**
* Type of this column *
*
* @see Type
*/
public Type getType() {
return this.type;
}
/**
* Type of this column *
*
* @see Type
*/
public ColumnMetaData setType(Type type) {
this.type = type;
return this;
}
public void unsetType() {
this.type = null;
}
/** Returns true if field type is set (has been assigned a value) and false otherwise */
public boolean isSetType() {
return this.type != null;
}
public void setTypeIsSet(boolean value) {
if (!value) {
this.type = null;
}
}
public int getEncodingsSize() {
return (this.encodings == null) ? 0 : this.encodings.size();
}
public java.util.Iterator getEncodingsIterator() {
return (this.encodings == null) ? null : this.encodings.iterator();
}
public void addToEncodings(Encoding elem) {
if (this.encodings == null) {
this.encodings = new ArrayList();
}
this.encodings.add(elem);
}
/**
* Set of all encodings used for this column. The purpose is to validate
* whether we can decode those pages. *
*/
public List getEncodings() {
return this.encodings;
}
/**
* Set of all encodings used for this column. The purpose is to validate
* whether we can decode those pages. *
*/
public ColumnMetaData setEncodings(List encodings) {
this.encodings = encodings;
return this;
}
public void unsetEncodings() {
this.encodings = null;
}
/** Returns true if field encodings is set (has been assigned a value) and false otherwise */
public boolean isSetEncodings() {
return this.encodings != null;
}
public void setEncodingsIsSet(boolean value) {
if (!value) {
this.encodings = null;
}
}
public int getPath_in_schemaSize() {
return (this.path_in_schema == null) ? 0 : this.path_in_schema.size();
}
public java.util.Iterator getPath_in_schemaIterator() {
return (this.path_in_schema == null) ? null : this.path_in_schema.iterator();
}
public void addToPath_in_schema(String elem) {
if (this.path_in_schema == null) {
this.path_in_schema = new ArrayList();
}
this.path_in_schema.add(elem);
}
/**
* Path in schema *
*/
public List getPath_in_schema() {
return this.path_in_schema;
}
/**
* Path in schema *
*/
public ColumnMetaData setPath_in_schema(List path_in_schema) {
this.path_in_schema = path_in_schema;
return this;
}
public void unsetPath_in_schema() {
this.path_in_schema = null;
}
/** Returns true if field path_in_schema is set (has been assigned a value) and false otherwise */
public boolean isSetPath_in_schema() {
return this.path_in_schema != null;
}
public void setPath_in_schemaIsSet(boolean value) {
if (!value) {
this.path_in_schema = null;
}
}
/**
* Compression codec *
*
* @see CompressionCodec
*/
public CompressionCodec getCodec() {
return this.codec;
}
/**
* Compression codec *
*
* @see CompressionCodec
*/
public ColumnMetaData setCodec(CompressionCodec codec) {
this.codec = codec;
return this;
}
public void unsetCodec() {
this.codec = null;
}
/** Returns true if field codec is set (has been assigned a value) and false otherwise */
public boolean isSetCodec() {
return this.codec != null;
}
public void setCodecIsSet(boolean value) {
if (!value) {
this.codec = null;
}
}
/**
* Number of values in this column *
*/
public long getNum_values() {
return this.num_values;
}
/**
* Number of values in this column *
*/
public ColumnMetaData setNum_values(long num_values) {
this.num_values = num_values;
setNum_valuesIsSet(true);
return this;
}
public void unsetNum_values() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_VALUES_ISSET_ID);
}
/** Returns true if field num_values is set (has been assigned a value) and false otherwise */
public boolean isSetNum_values() {
return EncodingUtils.testBit(__isset_bitfield, __NUM_VALUES_ISSET_ID);
}
public void setNum_valuesIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_VALUES_ISSET_ID, value);
}
/**
* total byte size of all uncompressed pages in this column chunk (including the headers) *
*/
public long getTotal_uncompressed_size() {
return this.total_uncompressed_size;
}
/**
* total byte size of all uncompressed pages in this column chunk (including the headers) *
*/
public ColumnMetaData setTotal_uncompressed_size(long total_uncompressed_size) {
this.total_uncompressed_size = total_uncompressed_size;
setTotal_uncompressed_sizeIsSet(true);
return this;
}
public void unsetTotal_uncompressed_size() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOTAL_UNCOMPRESSED_SIZE_ISSET_ID);
}
/** Returns true if field total_uncompressed_size is set (has been assigned a value) and false otherwise */
public boolean isSetTotal_uncompressed_size() {
return EncodingUtils.testBit(__isset_bitfield, __TOTAL_UNCOMPRESSED_SIZE_ISSET_ID);
}
public void setTotal_uncompressed_sizeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOTAL_UNCOMPRESSED_SIZE_ISSET_ID, value);
}
/**
* total byte size of all compressed pages in this column chunk (including the headers) *
*/
public long getTotal_compressed_size() {
return this.total_compressed_size;
}
/**
* total byte size of all compressed pages in this column chunk (including the headers) *
*/
public ColumnMetaData setTotal_compressed_size(long total_compressed_size) {
this.total_compressed_size = total_compressed_size;
setTotal_compressed_sizeIsSet(true);
return this;
}
public void unsetTotal_compressed_size() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOTAL_COMPRESSED_SIZE_ISSET_ID);
}
/** Returns true if field total_compressed_size is set (has been assigned a value) and false otherwise */
public boolean isSetTotal_compressed_size() {
return EncodingUtils.testBit(__isset_bitfield, __TOTAL_COMPRESSED_SIZE_ISSET_ID);
}
public void setTotal_compressed_sizeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOTAL_COMPRESSED_SIZE_ISSET_ID, value);
}
public int getKey_value_metadataSize() {
return (this.key_value_metadata == null) ? 0 : this.key_value_metadata.size();
}
public java.util.Iterator getKey_value_metadataIterator() {
return (this.key_value_metadata == null) ? null : this.key_value_metadata.iterator();
}
public void addToKey_value_metadata(KeyValue elem) {
if (this.key_value_metadata == null) {
this.key_value_metadata = new ArrayList();
}
this.key_value_metadata.add(elem);
}
/**
* Optional key/value metadata *
*/
public List getKey_value_metadata() {
return this.key_value_metadata;
}
/**
* Optional key/value metadata *
*/
public ColumnMetaData setKey_value_metadata(List key_value_metadata) {
this.key_value_metadata = key_value_metadata;
return this;
}
public void unsetKey_value_metadata() {
this.key_value_metadata = null;
}
/** Returns true if field key_value_metadata is set (has been assigned a value) and false otherwise */
public boolean isSetKey_value_metadata() {
return this.key_value_metadata != null;
}
public void setKey_value_metadataIsSet(boolean value) {
if (!value) {
this.key_value_metadata = null;
}
}
/**
* Byte offset from beginning of file to first data page *
*/
public long getData_page_offset() {
return this.data_page_offset;
}
/**
* Byte offset from beginning of file to first data page *
*/
public ColumnMetaData setData_page_offset(long data_page_offset) {
this.data_page_offset = data_page_offset;
setData_page_offsetIsSet(true);
return this;
}
public void unsetData_page_offset() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DATA_PAGE_OFFSET_ISSET_ID);
}
/** Returns true if field data_page_offset is set (has been assigned a value) and false otherwise */
public boolean isSetData_page_offset() {
return EncodingUtils.testBit(__isset_bitfield, __DATA_PAGE_OFFSET_ISSET_ID);
}
public void setData_page_offsetIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DATA_PAGE_OFFSET_ISSET_ID, value);
}
/**
* Byte offset from beginning of file to root index page *
*/
public long getIndex_page_offset() {
return this.index_page_offset;
}
/**
* Byte offset from beginning of file to root index page *
*/
public ColumnMetaData setIndex_page_offset(long index_page_offset) {
this.index_page_offset = index_page_offset;
setIndex_page_offsetIsSet(true);
return this;
}
public void unsetIndex_page_offset() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INDEX_PAGE_OFFSET_ISSET_ID);
}
/** Returns true if field index_page_offset is set (has been assigned a value) and false otherwise */
public boolean isSetIndex_page_offset() {
return EncodingUtils.testBit(__isset_bitfield, __INDEX_PAGE_OFFSET_ISSET_ID);
}
public void setIndex_page_offsetIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INDEX_PAGE_OFFSET_ISSET_ID, value);
}
/**
* Byte offset from the beginning of file to first (only) dictionary page *
*/
public long getDictionary_page_offset() {
return this.dictionary_page_offset;
}
/**
* Byte offset from the beginning of file to first (only) dictionary page *
*/
public ColumnMetaData setDictionary_page_offset(long dictionary_page_offset) {
this.dictionary_page_offset = dictionary_page_offset;
setDictionary_page_offsetIsSet(true);
return this;
}
public void unsetDictionary_page_offset() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DICTIONARY_PAGE_OFFSET_ISSET_ID);
}
/** Returns true if field dictionary_page_offset is set (has been assigned a value) and false otherwise */
public boolean isSetDictionary_page_offset() {
return EncodingUtils.testBit(__isset_bitfield, __DICTIONARY_PAGE_OFFSET_ISSET_ID);
}
public void setDictionary_page_offsetIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DICTIONARY_PAGE_OFFSET_ISSET_ID, value);
}
/**
* optional statistics for this column chunk
*/
public Statistics getStatistics() {
return this.statistics;
}
/**
* optional statistics for this column chunk
*/
public ColumnMetaData setStatistics(Statistics statistics) {
this.statistics = statistics;
return this;
}
public void unsetStatistics() {
this.statistics = null;
}
/** Returns true if field statistics is set (has been assigned a value) and false otherwise */
public boolean isSetStatistics() {
return this.statistics != null;
}
public void setStatisticsIsSet(boolean value) {
if (!value) {
this.statistics = null;
}
}
public int getEncoding_statsSize() {
return (this.encoding_stats == null) ? 0 : this.encoding_stats.size();
}
public java.util.Iterator getEncoding_statsIterator() {
return (this.encoding_stats == null) ? null : this.encoding_stats.iterator();
}
public void addToEncoding_stats(PageEncodingStats elem) {
if (this.encoding_stats == null) {
this.encoding_stats = new ArrayList();
}
this.encoding_stats.add(elem);
}
/**
* Set of all encodings used for pages in this column chunk.
* This information can be used to determine if all data pages are
* dictionary encoded for example *
*/
public List getEncoding_stats() {
return this.encoding_stats;
}
/**
* Set of all encodings used for pages in this column chunk.
* This information can be used to determine if all data pages are
* dictionary encoded for example *
*/
public ColumnMetaData setEncoding_stats(List encoding_stats) {
this.encoding_stats = encoding_stats;
return this;
}
public void unsetEncoding_stats() {
this.encoding_stats = null;
}
/** Returns true if field encoding_stats is set (has been assigned a value) and false otherwise */
public boolean isSetEncoding_stats() {
return this.encoding_stats != null;
}
public void setEncoding_statsIsSet(boolean value) {
if (!value) {
this.encoding_stats = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TYPE:
if (value == null) {
unsetType();
} else {
setType((Type)value);
}
break;
case ENCODINGS:
if (value == null) {
unsetEncodings();
} else {
setEncodings((List)value);
}
break;
case PATH_IN_SCHEMA:
if (value == null) {
unsetPath_in_schema();
} else {
setPath_in_schema((List)value);
}
break;
case CODEC:
if (value == null) {
unsetCodec();
} else {
setCodec((CompressionCodec)value);
}
break;
case NUM_VALUES:
if (value == null) {
unsetNum_values();
} else {
setNum_values((Long)value);
}
break;
case TOTAL_UNCOMPRESSED_SIZE:
if (value == null) {
unsetTotal_uncompressed_size();
} else {
setTotal_uncompressed_size((Long)value);
}
break;
case TOTAL_COMPRESSED_SIZE:
if (value == null) {
unsetTotal_compressed_size();
} else {
setTotal_compressed_size((Long)value);
}
break;
case KEY_VALUE_METADATA:
if (value == null) {
unsetKey_value_metadata();
} else {
setKey_value_metadata((List)value);
}
break;
case DATA_PAGE_OFFSET:
if (value == null) {
unsetData_page_offset();
} else {
setData_page_offset((Long)value);
}
break;
case INDEX_PAGE_OFFSET:
if (value == null) {
unsetIndex_page_offset();
} else {
setIndex_page_offset((Long)value);
}
break;
case DICTIONARY_PAGE_OFFSET:
if (value == null) {
unsetDictionary_page_offset();
} else {
setDictionary_page_offset((Long)value);
}
break;
case STATISTICS:
if (value == null) {
unsetStatistics();
} else {
setStatistics((Statistics)value);
}
break;
case ENCODING_STATS:
if (value == null) {
unsetEncoding_stats();
} else {
setEncoding_stats((List)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TYPE:
return getType();
case ENCODINGS:
return getEncodings();
case PATH_IN_SCHEMA:
return getPath_in_schema();
case CODEC:
return getCodec();
case NUM_VALUES:
return getNum_values();
case TOTAL_UNCOMPRESSED_SIZE:
return getTotal_uncompressed_size();
case TOTAL_COMPRESSED_SIZE:
return getTotal_compressed_size();
case KEY_VALUE_METADATA:
return getKey_value_metadata();
case DATA_PAGE_OFFSET:
return getData_page_offset();
case INDEX_PAGE_OFFSET:
return getIndex_page_offset();
case DICTIONARY_PAGE_OFFSET:
return getDictionary_page_offset();
case STATISTICS:
return getStatistics();
case ENCODING_STATS:
return getEncoding_stats();
}
throw new IllegalStateException();
}
/** 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 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();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof ColumnMetaData)
return this.equals((ColumnMetaData)that);
return false;
}
public boolean equals(ColumnMetaData that) {
if (that == null)
return false;
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))
return false;
if (!this.type.equals(that.type))
return false;
}
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))
return false;
if (!this.encodings.equals(that.encodings))
return false;
}
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))
return false;
if (!this.path_in_schema.equals(that.path_in_schema))
return false;
}
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))
return false;
if (!this.codec.equals(that.codec))
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_total_uncompressed_size = true;
boolean that_present_total_uncompressed_size = true;
if (this_present_total_uncompressed_size || that_present_total_uncompressed_size) {
if (!(this_present_total_uncompressed_size && that_present_total_uncompressed_size))
return false;
if (this.total_uncompressed_size != that.total_uncompressed_size)
return false;
}
boolean this_present_total_compressed_size = true;
boolean that_present_total_compressed_size = true;
if (this_present_total_compressed_size || that_present_total_compressed_size) {
if (!(this_present_total_compressed_size && that_present_total_compressed_size))
return false;
if (this.total_compressed_size != that.total_compressed_size)
return false;
}
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))
return false;
if (!this.key_value_metadata.equals(that.key_value_metadata))
return false;
}
boolean this_present_data_page_offset = true;
boolean that_present_data_page_offset = true;
if (this_present_data_page_offset || that_present_data_page_offset) {
if (!(this_present_data_page_offset && that_present_data_page_offset))
return false;
if (this.data_page_offset != that.data_page_offset)
return false;
}
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))
return false;
if (this.index_page_offset != that.index_page_offset)
return false;
}
boolean this_present_dictionary_page_offset = true && this.isSetDictionary_page_offset();
boolean that_present_dictionary_page_offset = true && that.isSetDictionary_page_offset();
if (this_present_dictionary_page_offset || that_present_dictionary_page_offset) {
if (!(this_present_dictionary_page_offset && that_present_dictionary_page_offset))
return false;
if (this.dictionary_page_offset != that.dictionary_page_offset)
return false;
}
boolean this_present_statistics = true && this.isSetStatistics();
boolean that_present_statistics = true && that.isSetStatistics();
if (this_present_statistics || that_present_statistics) {
if (!(this_present_statistics && that_present_statistics))
return false;
if (!this.statistics.equals(that.statistics))
return false;
}
boolean this_present_encoding_stats = true && this.isSetEncoding_stats();
boolean that_present_encoding_stats = true && that.isSetEncoding_stats();
if (this_present_encoding_stats || that_present_encoding_stats) {
if (!(this_present_encoding_stats && that_present_encoding_stats))
return false;
if (!this.encoding_stats.equals(that.encoding_stats))
return false;
}
return true;
}
@Override
public int hashCode() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy