ColumnMetaData.java
/**
* Autogenerated by Thrift Compiler (0.16.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.parquet.format;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* Description for column metadata
*/
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)", date = "2026-05-14")
public class ColumnMetaData implements org.apache.thrift.TBase<ColumnMetaData, ColumnMetaData._Fields>, java.io.Serializable, Cloneable, Comparable<ColumnMetaData> {
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 org.apache.thrift.protocol.TField BLOOM_FILTER_OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("bloom_filter_offset", org.apache.thrift.protocol.TType.I64, (short)14);
private static final org.apache.thrift.protocol.TField BLOOM_FILTER_LENGTH_FIELD_DESC = new org.apache.thrift.protocol.TField("bloom_filter_length", org.apache.thrift.protocol.TType.I32, (short)15);
private static final org.apache.thrift.protocol.TField SIZE_STATISTICS_FIELD_DESC = new org.apache.thrift.protocol.TField("size_statistics", org.apache.thrift.protocol.TType.STRUCT, (short)16);
private static final org.apache.thrift.protocol.TField GEOSPATIAL_STATISTICS_FIELD_DESC = new org.apache.thrift.protocol.TField("geospatial_statistics", org.apache.thrift.protocol.TType.STRUCT, (short)17);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ColumnMetaDataStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ColumnMetaDataTupleSchemeFactory();
/**
* Type of this column *
*
* @see Type
*/
public @org.apache.thrift.annotation.Nullable Type type; // required
/**
* Set of all encodings used for this column. The purpose is to validate
* whether we can decode those pages. *
*/
public @org.apache.thrift.annotation.Nullable java.util.List<Encoding> encodings; // required
/**
* Path in schema *
*/
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> path_in_schema; // required
/**
* Compression codec *
*
* @see CompressionCodec
*/
public @org.apache.thrift.annotation.Nullable 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, and potentially encrypted, pages
* in this column chunk (including the headers) *
*/
public long total_compressed_size; // required
/**
* Optional key/value metadata *
*/
public @org.apache.thrift.annotation.Nullable java.util.List<KeyValue> 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 @org.apache.thrift.annotation.Nullable 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 @org.apache.thrift.annotation.Nullable java.util.List<PageEncodingStats> encoding_stats; // optional
/**
* Byte offset from beginning of file to Bloom filter data. *
*/
public long bloom_filter_offset; // optional
/**
* Size of Bloom filter data including the serialized header, in bytes.
* Added in 2.10 so readers may not read this field from old files and
* it can be obtained after the BloomFilterHeader has been deserialized.
* Writers should write this field so readers can read the bloom filter
* in a single I/O.
*/
public int bloom_filter_length; // optional
/**
* Optional statistics to help estimate total memory when converted to inmemory
* representations. The histograms contained in these statistics can
* also be useful in some cases for more finegrained nullability/list length
* filter pushdown.
*/
public @org.apache.thrift.annotation.Nullable SizeStatistics size_statistics; // optional
/**
* Optional statistics specific for Geometry and Geography logical types
*/
public @org.apache.thrift.annotation.Nullable GeospatialStatistics geospatial_statistics; // 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, and potentially encrypted, 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"),
/**
* Byte offset from beginning of file to Bloom filter data. *
*/
BLOOM_FILTER_OFFSET((short)14, "bloom_filter_offset"),
/**
* Size of Bloom filter data including the serialized header, in bytes.
* Added in 2.10 so readers may not read this field from old files and
* it can be obtained after the BloomFilterHeader has been deserialized.
* Writers should write this field so readers can read the bloom filter
* in a single I/O.
*/
BLOOM_FILTER_LENGTH((short)15, "bloom_filter_length"),
/**
* Optional statistics to help estimate total memory when converted to inmemory
* representations. The histograms contained in these statistics can
* also be useful in some cases for more finegrained nullability/list length
* filter pushdown.
*/
SIZE_STATISTICS((short)16, "size_statistics"),
/**
* Optional statistics specific for Geometry and Geography logical types
*/
GEOSPATIAL_STATISTICS((short)17, "geospatial_statistics");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
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;
case 14: // BLOOM_FILTER_OFFSET
return BLOOM_FILTER_OFFSET;
case 15: // BLOOM_FILTER_LENGTH
return BLOOM_FILTER_LENGTH;
case 16: // SIZE_STATISTICS
return SIZE_STATISTICS;
case 17: // GEOSPATIAL_STATISTICS
return GEOSPATIAL_STATISTICS;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.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 static final int __BLOOM_FILTER_OFFSET_ISSET_ID = 6;
private static final int __BLOOM_FILTER_LENGTH_ISSET_ID = 7;
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,_Fields.BLOOM_FILTER_OFFSET,_Fields.BLOOM_FILTER_LENGTH,_Fields.SIZE_STATISTICS,_Fields.GEOSPATIAL_STATISTICS};
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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))));
tmpMap.put(_Fields.BLOOM_FILTER_OFFSET, new org.apache.thrift.meta_data.FieldMetaData("bloom_filter_offset", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.BLOOM_FILTER_LENGTH, new org.apache.thrift.meta_data.FieldMetaData("bloom_filter_length", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.SIZE_STATISTICS, new org.apache.thrift.meta_data.FieldMetaData("size_statistics", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SizeStatistics.class)));
tmpMap.put(_Fields.GEOSPATIAL_STATISTICS, new org.apache.thrift.meta_data.FieldMetaData("geospatial_statistics", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GeospatialStatistics.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnMetaData.class, metaDataMap);
}
public ColumnMetaData() {
}
public ColumnMetaData(
Type type,
java.util.List<Encoding> encodings,
java.util.List<java.lang.String> 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;
setNumValuesIsSet(true);
this.total_uncompressed_size = total_uncompressed_size;
setTotalUncompressedSizeIsSet(true);
this.total_compressed_size = total_compressed_size;
setTotalCompressedSizeIsSet(true);
this.data_page_offset = data_page_offset;
setDataPageOffsetIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public ColumnMetaData(ColumnMetaData other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetType()) {
this.type = other.type;
}
if (other.isSetEncodings()) {
java.util.List<Encoding> __this__encodings = new java.util.ArrayList<Encoding>(other.encodings.size());
for (Encoding other_element : other.encodings) {
__this__encodings.add(other_element);
}
this.encodings = __this__encodings;
}
if (other.isSetPathInSchema()) {
java.util.List<java.lang.String> __this__path_in_schema = new java.util.ArrayList<java.lang.String>(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.isSetKeyValueMetadata()) {
java.util.List<KeyValue> __this__key_value_metadata = new java.util.ArrayList<KeyValue>(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.isSetEncodingStats()) {
java.util.List<PageEncodingStats> __this__encoding_stats = new java.util.ArrayList<PageEncodingStats>(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;
}
this.bloom_filter_offset = other.bloom_filter_offset;
this.bloom_filter_length = other.bloom_filter_length;
if (other.isSetSizeStatistics()) {
this.size_statistics = new SizeStatistics(other.size_statistics);
}
if (other.isSetGeospatialStatistics()) {
this.geospatial_statistics = new GeospatialStatistics(other.geospatial_statistics);
}
}
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;
setNumValuesIsSet(false);
this.num_values = 0;
setTotalUncompressedSizeIsSet(false);
this.total_uncompressed_size = 0;
setTotalCompressedSizeIsSet(false);
this.total_compressed_size = 0;
this.key_value_metadata = null;
setDataPageOffsetIsSet(false);
this.data_page_offset = 0;
setIndexPageOffsetIsSet(false);
this.index_page_offset = 0;
setDictionaryPageOffsetIsSet(false);
this.dictionary_page_offset = 0;
this.statistics = null;
this.encoding_stats = null;
setBloomFilterOffsetIsSet(false);
this.bloom_filter_offset = 0;
setBloomFilterLengthIsSet(false);
this.bloom_filter_length = 0;
this.size_statistics = null;
this.geospatial_statistics = null;
}
/**
* Type of this column *
*
* @see Type
*/
@org.apache.thrift.annotation.Nullable
public Type getType() {
return this.type;
}
/**
* Type of this column *
*
* @see Type
*/
public ColumnMetaData setType(@org.apache.thrift.annotation.Nullable 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();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<Encoding> getEncodingsIterator() {
return (this.encodings == null) ? null : this.encodings.iterator();
}
public void addToEncodings(Encoding elem) {
if (this.encodings == null) {
this.encodings = new java.util.ArrayList<Encoding>();
}
this.encodings.add(elem);
}
/**
* Set of all encodings used for this column. The purpose is to validate
* whether we can decode those pages. *
*/
@org.apache.thrift.annotation.Nullable
public java.util.List<Encoding> 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(@org.apache.thrift.annotation.Nullable java.util.List<Encoding> 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 getPathInSchemaSize() {
return (this.path_in_schema == null) ? 0 : this.path_in_schema.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.String> getPathInSchemaIterator() {
return (this.path_in_schema == null) ? null : this.path_in_schema.iterator();
}
public void addToPathInSchema(java.lang.String elem) {
if (this.path_in_schema == null) {
this.path_in_schema = new java.util.ArrayList<java.lang.String>();
}
this.path_in_schema.add(elem);
}
/**
* Path in schema *
*/
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.String> getPathInSchema() {
return this.path_in_schema;
}
/**
* Path in schema *
*/
public ColumnMetaData setPathInSchema(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> path_in_schema) {
this.path_in_schema = path_in_schema;
return this;
}
public void unsetPathInSchema() {
this.path_in_schema = null;
}
/** Returns true if field path_in_schema is set (has been assigned a value) and false otherwise */
public boolean isSetPathInSchema() {
return this.path_in_schema != null;
}
public void setPathInSchemaIsSet(boolean value) {
if (!value) {
this.path_in_schema = null;
}
}
/**
* Compression codec *
*
* @see CompressionCodec
*/
@org.apache.thrift.annotation.Nullable
public CompressionCodec getCodec() {
return this.codec;
}
/**
* Compression codec *
*
* @see CompressionCodec
*/
public ColumnMetaData setCodec(@org.apache.thrift.annotation.Nullable 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 getNumValues() {
return this.num_values;
}
/**
* Number of values in this column *
*/
public ColumnMetaData setNumValues(long num_values) {
this.num_values = num_values;
setNumValuesIsSet(true);
return this;
}
public void unsetNumValues() {
__isset_bitfield = org.apache.thrift.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 isSetNumValues() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUM_VALUES_ISSET_ID);
}
public void setNumValuesIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.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 getTotalUncompressedSize() {
return this.total_uncompressed_size;
}
/**
* total byte size of all uncompressed pages in this column chunk (including the headers) *
*/
public ColumnMetaData setTotalUncompressedSize(long total_uncompressed_size) {
this.total_uncompressed_size = total_uncompressed_size;
setTotalUncompressedSizeIsSet(true);
return this;
}
public void unsetTotalUncompressedSize() {
__isset_bitfield = org.apache.thrift.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 isSetTotalUncompressedSize() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TOTAL_UNCOMPRESSED_SIZE_ISSET_ID);
}
public void setTotalUncompressedSizeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TOTAL_UNCOMPRESSED_SIZE_ISSET_ID, value);
}
/**
* total byte size of all compressed, and potentially encrypted, pages
* in this column chunk (including the headers) *
*/
public long getTotalCompressedSize() {
return this.total_compressed_size;
}
/**
* total byte size of all compressed, and potentially encrypted, pages
* in this column chunk (including the headers) *
*/
public ColumnMetaData setTotalCompressedSize(long total_compressed_size) {
this.total_compressed_size = total_compressed_size;
setTotalCompressedSizeIsSet(true);
return this;
}
public void unsetTotalCompressedSize() {
__isset_bitfield = org.apache.thrift.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 isSetTotalCompressedSize() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TOTAL_COMPRESSED_SIZE_ISSET_ID);
}
public void setTotalCompressedSizeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TOTAL_COMPRESSED_SIZE_ISSET_ID, value);
}
public int getKeyValueMetadataSize() {
return (this.key_value_metadata == null) ? 0 : this.key_value_metadata.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<KeyValue> getKeyValueMetadataIterator() {
return (this.key_value_metadata == null) ? null : this.key_value_metadata.iterator();
}
public void addToKeyValueMetadata(KeyValue elem) {
if (this.key_value_metadata == null) {
this.key_value_metadata = new java.util.ArrayList<KeyValue>();
}
this.key_value_metadata.add(elem);
}
/**
* Optional key/value metadata *
*/
@org.apache.thrift.annotation.Nullable
public java.util.List<KeyValue> getKeyValueMetadata() {
return this.key_value_metadata;
}
/**
* Optional key/value metadata *
*/
public ColumnMetaData setKeyValueMetadata(@org.apache.thrift.annotation.Nullable java.util.List<KeyValue> key_value_metadata) {
this.key_value_metadata = key_value_metadata;
return this;
}
public void unsetKeyValueMetadata() {
this.key_value_metadata = null;
}
/** Returns true if field key_value_metadata is set (has been assigned a value) and false otherwise */
public boolean isSetKeyValueMetadata() {
return this.key_value_metadata != null;
}
public void setKeyValueMetadataIsSet(boolean value) {
if (!value) {
this.key_value_metadata = null;
}
}
/**
* Byte offset from beginning of file to first data page *
*/
public long getDataPageOffset() {
return this.data_page_offset;
}
/**
* Byte offset from beginning of file to first data page *
*/
public ColumnMetaData setDataPageOffset(long data_page_offset) {
this.data_page_offset = data_page_offset;
setDataPageOffsetIsSet(true);
return this;
}
public void unsetDataPageOffset() {
__isset_bitfield = org.apache.thrift.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 isSetDataPageOffset() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DATA_PAGE_OFFSET_ISSET_ID);
}
public void setDataPageOffsetIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DATA_PAGE_OFFSET_ISSET_ID, value);
}
/**
* Byte offset from beginning of file to root index page *
*/
public long getIndexPageOffset() {
return this.index_page_offset;
}
/**
* Byte offset from beginning of file to root index page *
*/
public ColumnMetaData setIndexPageOffset(long index_page_offset) {
this.index_page_offset = index_page_offset;
setIndexPageOffsetIsSet(true);
return this;
}
public void unsetIndexPageOffset() {
__isset_bitfield = org.apache.thrift.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 isSetIndexPageOffset() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INDEX_PAGE_OFFSET_ISSET_ID);
}
public void setIndexPageOffsetIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INDEX_PAGE_OFFSET_ISSET_ID, value);
}
/**
* Byte offset from the beginning of file to first (only) dictionary page *
*/
public long getDictionaryPageOffset() {
return this.dictionary_page_offset;
}
/**
* Byte offset from the beginning of file to first (only) dictionary page *
*/
public ColumnMetaData setDictionaryPageOffset(long dictionary_page_offset) {
this.dictionary_page_offset = dictionary_page_offset;
setDictionaryPageOffsetIsSet(true);
return this;
}
public void unsetDictionaryPageOffset() {
__isset_bitfield = org.apache.thrift.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 isSetDictionaryPageOffset() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DICTIONARY_PAGE_OFFSET_ISSET_ID);
}
public void setDictionaryPageOffsetIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DICTIONARY_PAGE_OFFSET_ISSET_ID, value);
}
/**
* optional statistics for this column chunk
*/
@org.apache.thrift.annotation.Nullable
public Statistics getStatistics() {
return this.statistics;
}
/**
* optional statistics for this column chunk
*/
public ColumnMetaData setStatistics(@org.apache.thrift.annotation.Nullable 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 getEncodingStatsSize() {
return (this.encoding_stats == null) ? 0 : this.encoding_stats.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<PageEncodingStats> getEncodingStatsIterator() {
return (this.encoding_stats == null) ? null : this.encoding_stats.iterator();
}
public void addToEncodingStats(PageEncodingStats elem) {
if (this.encoding_stats == null) {
this.encoding_stats = new java.util.ArrayList<PageEncodingStats>();
}
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 *
*/
@org.apache.thrift.annotation.Nullable
public java.util.List<PageEncodingStats> getEncodingStats() {
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 setEncodingStats(@org.apache.thrift.annotation.Nullable java.util.List<PageEncodingStats> encoding_stats) {
this.encoding_stats = encoding_stats;
return this;
}
public void unsetEncodingStats() {
this.encoding_stats = null;
}
/** Returns true if field encoding_stats is set (has been assigned a value) and false otherwise */
public boolean isSetEncodingStats() {
return this.encoding_stats != null;
}
public void setEncodingStatsIsSet(boolean value) {
if (!value) {
this.encoding_stats = null;
}
}
/**
* Byte offset from beginning of file to Bloom filter data. *
*/
public long getBloomFilterOffset() {
return this.bloom_filter_offset;
}
/**
* Byte offset from beginning of file to Bloom filter data. *
*/
public ColumnMetaData setBloomFilterOffset(long bloom_filter_offset) {
this.bloom_filter_offset = bloom_filter_offset;
setBloomFilterOffsetIsSet(true);
return this;
}
public void unsetBloomFilterOffset() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BLOOM_FILTER_OFFSET_ISSET_ID);
}
/** Returns true if field bloom_filter_offset is set (has been assigned a value) and false otherwise */
public boolean isSetBloomFilterOffset() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BLOOM_FILTER_OFFSET_ISSET_ID);
}
public void setBloomFilterOffsetIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BLOOM_FILTER_OFFSET_ISSET_ID, value);
}
/**
* Size of Bloom filter data including the serialized header, in bytes.
* Added in 2.10 so readers may not read this field from old files and
* it can be obtained after the BloomFilterHeader has been deserialized.
* Writers should write this field so readers can read the bloom filter
* in a single I/O.
*/
public int getBloomFilterLength() {
return this.bloom_filter_length;
}
/**
* Size of Bloom filter data including the serialized header, in bytes.
* Added in 2.10 so readers may not read this field from old files and
* it can be obtained after the BloomFilterHeader has been deserialized.
* Writers should write this field so readers can read the bloom filter
* in a single I/O.
*/
public ColumnMetaData setBloomFilterLength(int bloom_filter_length) {
this.bloom_filter_length = bloom_filter_length;
setBloomFilterLengthIsSet(true);
return this;
}
public void unsetBloomFilterLength() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BLOOM_FILTER_LENGTH_ISSET_ID);
}
/** Returns true if field bloom_filter_length is set (has been assigned a value) and false otherwise */
public boolean isSetBloomFilterLength() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BLOOM_FILTER_LENGTH_ISSET_ID);
}
public void setBloomFilterLengthIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BLOOM_FILTER_LENGTH_ISSET_ID, value);
}
/**
* Optional statistics to help estimate total memory when converted to inmemory
* representations. The histograms contained in these statistics can
* also be useful in some cases for more finegrained nullability/list length
* filter pushdown.
*/
@org.apache.thrift.annotation.Nullable
public SizeStatistics getSizeStatistics() {
return this.size_statistics;
}
/**
* Optional statistics to help estimate total memory when converted to inmemory
* representations. The histograms contained in these statistics can
* also be useful in some cases for more finegrained nullability/list length
* filter pushdown.
*/
public ColumnMetaData setSizeStatistics(@org.apache.thrift.annotation.Nullable SizeStatistics size_statistics) {
this.size_statistics = size_statistics;
return this;
}
public void unsetSizeStatistics() {
this.size_statistics = null;
}
/** Returns true if field size_statistics is set (has been assigned a value) and false otherwise */
public boolean isSetSizeStatistics() {
return this.size_statistics != null;
}
public void setSizeStatisticsIsSet(boolean value) {
if (!value) {
this.size_statistics = null;
}
}
/**
* Optional statistics specific for Geometry and Geography logical types
*/
@org.apache.thrift.annotation.Nullable
public GeospatialStatistics getGeospatialStatistics() {
return this.geospatial_statistics;
}
/**
* Optional statistics specific for Geometry and Geography logical types
*/
public ColumnMetaData setGeospatialStatistics(@org.apache.thrift.annotation.Nullable GeospatialStatistics geospatial_statistics) {
this.geospatial_statistics = geospatial_statistics;
return this;
}
public void unsetGeospatialStatistics() {
this.geospatial_statistics = null;
}
/** Returns true if field geospatial_statistics is set (has been assigned a value) and false otherwise */
public boolean isSetGeospatialStatistics() {
return this.geospatial_statistics != null;
}
public void setGeospatialStatisticsIsSet(boolean value) {
if (!value) {
this.geospatial_statistics = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TYPE:
if (value == null) {
unsetType();
} else {
setType((Type)value);
}
break;
case ENCODINGS:
if (value == null) {
unsetEncodings();
} else {
setEncodings((java.util.List<Encoding>)value);
}
break;
case PATH_IN_SCHEMA:
if (value == null) {
unsetPathInSchema();
} else {
setPathInSchema((java.util.List<java.lang.String>)value);
}
break;
case CODEC:
if (value == null) {
unsetCodec();
} else {
setCodec((CompressionCodec)value);
}
break;
case NUM_VALUES:
if (value == null) {
unsetNumValues();
} else {
setNumValues((java.lang.Long)value);
}
break;
case TOTAL_UNCOMPRESSED_SIZE:
if (value == null) {
unsetTotalUncompressedSize();
} else {
setTotalUncompressedSize((java.lang.Long)value);
}
break;
case TOTAL_COMPRESSED_SIZE:
if (value == null) {
unsetTotalCompressedSize();
} else {
setTotalCompressedSize((java.lang.Long)value);
}
break;
case KEY_VALUE_METADATA:
if (value == null) {
unsetKeyValueMetadata();
} else {
setKeyValueMetadata((java.util.List<KeyValue>)value);
}
break;
case DATA_PAGE_OFFSET:
if (value == null) {
unsetDataPageOffset();
} else {
setDataPageOffset((java.lang.Long)value);
}
break;
case INDEX_PAGE_OFFSET:
if (value == null) {
unsetIndexPageOffset();
} else {
setIndexPageOffset((java.lang.Long)value);
}
break;
case DICTIONARY_PAGE_OFFSET:
if (value == null) {
unsetDictionaryPageOffset();
} else {
setDictionaryPageOffset((java.lang.Long)value);
}
break;
case STATISTICS:
if (value == null) {
unsetStatistics();
} else {
setStatistics((Statistics)value);
}
break;
case ENCODING_STATS:
if (value == null) {
unsetEncodingStats();
} else {
setEncodingStats((java.util.List<PageEncodingStats>)value);
}
break;
case BLOOM_FILTER_OFFSET:
if (value == null) {
unsetBloomFilterOffset();
} else {
setBloomFilterOffset((java.lang.Long)value);
}
break;
case BLOOM_FILTER_LENGTH:
if (value == null) {
unsetBloomFilterLength();
} else {
setBloomFilterLength((java.lang.Integer)value);
}
break;
case SIZE_STATISTICS:
if (value == null) {
unsetSizeStatistics();
} else {
setSizeStatistics((SizeStatistics)value);
}
break;
case GEOSPATIAL_STATISTICS:
if (value == null) {
unsetGeospatialStatistics();
} else {
setGeospatialStatistics((GeospatialStatistics)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TYPE:
return getType();
case ENCODINGS:
return getEncodings();
case PATH_IN_SCHEMA:
return getPathInSchema();
case CODEC:
return getCodec();
case NUM_VALUES:
return getNumValues();
case TOTAL_UNCOMPRESSED_SIZE:
return getTotalUncompressedSize();
case TOTAL_COMPRESSED_SIZE:
return getTotalCompressedSize();
case KEY_VALUE_METADATA:
return getKeyValueMetadata();
case DATA_PAGE_OFFSET:
return getDataPageOffset();
case INDEX_PAGE_OFFSET:
return getIndexPageOffset();
case DICTIONARY_PAGE_OFFSET:
return getDictionaryPageOffset();
case STATISTICS:
return getStatistics();
case ENCODING_STATS:
return getEncodingStats();
case BLOOM_FILTER_OFFSET:
return getBloomFilterOffset();
case BLOOM_FILTER_LENGTH:
return getBloomFilterLength();
case SIZE_STATISTICS:
return getSizeStatistics();
case GEOSPATIAL_STATISTICS:
return getGeospatialStatistics();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case TYPE:
return isSetType();
case ENCODINGS:
return isSetEncodings();
case PATH_IN_SCHEMA:
return isSetPathInSchema();
case CODEC:
return isSetCodec();
case NUM_VALUES:
return isSetNumValues();
case TOTAL_UNCOMPRESSED_SIZE:
return isSetTotalUncompressedSize();
case TOTAL_COMPRESSED_SIZE:
return isSetTotalCompressedSize();
case KEY_VALUE_METADATA:
return isSetKeyValueMetadata();
case DATA_PAGE_OFFSET:
return isSetDataPageOffset();
case INDEX_PAGE_OFFSET:
return isSetIndexPageOffset();
case DICTIONARY_PAGE_OFFSET:
return isSetDictionaryPageOffset();
case STATISTICS:
return isSetStatistics();
case ENCODING_STATS:
return isSetEncodingStats();
case BLOOM_FILTER_OFFSET:
return isSetBloomFilterOffset();
case BLOOM_FILTER_LENGTH:
return isSetBloomFilterLength();
case SIZE_STATISTICS:
return isSetSizeStatistics();
case GEOSPATIAL_STATISTICS:
return isSetGeospatialStatistics();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof ColumnMetaData)
return this.equals((ColumnMetaData)that);
return false;
}
public boolean equals(ColumnMetaData that) {
if (that == null)
return false;
if (this == that)
return true;
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.isSetPathInSchema();
boolean that_present_path_in_schema = true && that.isSetPathInSchema();
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.isSetKeyValueMetadata();
boolean that_present_key_value_metadata = true && that.isSetKeyValueMetadata();
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.isSetIndexPageOffset();
boolean that_present_index_page_offset = true && that.isSetIndexPageOffset();
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.isSetDictionaryPageOffset();
boolean that_present_dictionary_page_offset = true && that.isSetDictionaryPageOffset();
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.isSetEncodingStats();
boolean that_present_encoding_stats = true && that.isSetEncodingStats();
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;
}
boolean this_present_bloom_filter_offset = true && this.isSetBloomFilterOffset();
boolean that_present_bloom_filter_offset = true && that.isSetBloomFilterOffset();
if (this_present_bloom_filter_offset || that_present_bloom_filter_offset) {
if (!(this_present_bloom_filter_offset && that_present_bloom_filter_offset))
return false;
if (this.bloom_filter_offset != that.bloom_filter_offset)
return false;
}
boolean this_present_bloom_filter_length = true && this.isSetBloomFilterLength();
boolean that_present_bloom_filter_length = true && that.isSetBloomFilterLength();
if (this_present_bloom_filter_length || that_present_bloom_filter_length) {
if (!(this_present_bloom_filter_length && that_present_bloom_filter_length))
return false;
if (this.bloom_filter_length != that.bloom_filter_length)
return false;
}
boolean this_present_size_statistics = true && this.isSetSizeStatistics();
boolean that_present_size_statistics = true && that.isSetSizeStatistics();
if (this_present_size_statistics || that_present_size_statistics) {
if (!(this_present_size_statistics && that_present_size_statistics))
return false;
if (!this.size_statistics.equals(that.size_statistics))
return false;
}
boolean this_present_geospatial_statistics = true && this.isSetGeospatialStatistics();
boolean that_present_geospatial_statistics = true && that.isSetGeospatialStatistics();
if (this_present_geospatial_statistics || that_present_geospatial_statistics) {
if (!(this_present_geospatial_statistics && that_present_geospatial_statistics))
return false;
if (!this.geospatial_statistics.equals(that.geospatial_statistics))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
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 + ((isSetPathInSchema()) ? 131071 : 524287);
if (isSetPathInSchema())
hashCode = hashCode * 8191 + path_in_schema.hashCode();
hashCode = hashCode * 8191 + ((isSetCodec()) ? 131071 : 524287);
if (isSetCodec())
hashCode = hashCode * 8191 + codec.getValue();
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(num_values);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(total_uncompressed_size);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(total_compressed_size);
hashCode = hashCode * 8191 + ((isSetKeyValueMetadata()) ? 131071 : 524287);
if (isSetKeyValueMetadata())
hashCode = hashCode * 8191 + key_value_metadata.hashCode();
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(data_page_offset);
hashCode = hashCode * 8191 + ((isSetIndexPageOffset()) ? 131071 : 524287);
if (isSetIndexPageOffset())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(index_page_offset);
hashCode = hashCode * 8191 + ((isSetDictionaryPageOffset()) ? 131071 : 524287);
if (isSetDictionaryPageOffset())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(dictionary_page_offset);
hashCode = hashCode * 8191 + ((isSetStatistics()) ? 131071 : 524287);
if (isSetStatistics())
hashCode = hashCode * 8191 + statistics.hashCode();
hashCode = hashCode * 8191 + ((isSetEncodingStats()) ? 131071 : 524287);
if (isSetEncodingStats())
hashCode = hashCode * 8191 + encoding_stats.hashCode();
hashCode = hashCode * 8191 + ((isSetBloomFilterOffset()) ? 131071 : 524287);
if (isSetBloomFilterOffset())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(bloom_filter_offset);
hashCode = hashCode * 8191 + ((isSetBloomFilterLength()) ? 131071 : 524287);
if (isSetBloomFilterLength())
hashCode = hashCode * 8191 + bloom_filter_length;
hashCode = hashCode * 8191 + ((isSetSizeStatistics()) ? 131071 : 524287);
if (isSetSizeStatistics())
hashCode = hashCode * 8191 + size_statistics.hashCode();
hashCode = hashCode * 8191 + ((isSetGeospatialStatistics()) ? 131071 : 524287);
if (isSetGeospatialStatistics())
hashCode = hashCode * 8191 + geospatial_statistics.hashCode();
return hashCode;
}
@Override
public int compareTo(ColumnMetaData other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetType()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetEncodings(), other.isSetEncodings());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEncodings()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.encodings, other.encodings);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPathInSchema(), other.isSetPathInSchema());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPathInSchema()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path_in_schema, other.path_in_schema);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCodec(), other.isSetCodec());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCodec()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codec, other.codec);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetNumValues(), other.isSetNumValues());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNumValues()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_values, other.num_values);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTotalUncompressedSize(), other.isSetTotalUncompressedSize());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTotalUncompressedSize()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.total_uncompressed_size, other.total_uncompressed_size);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTotalCompressedSize(), other.isSetTotalCompressedSize());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTotalCompressedSize()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.total_compressed_size, other.total_compressed_size);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetKeyValueMetadata(), other.isSetKeyValueMetadata());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetKeyValueMetadata()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key_value_metadata, other.key_value_metadata);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDataPageOffset(), other.isSetDataPageOffset());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDataPageOffset()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data_page_offset, other.data_page_offset);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetIndexPageOffset(), other.isSetIndexPageOffset());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIndexPageOffset()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_page_offset, other.index_page_offset);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDictionaryPageOffset(), other.isSetDictionaryPageOffset());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDictionaryPageOffset()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dictionary_page_offset, other.dictionary_page_offset);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetStatistics(), other.isSetStatistics());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStatistics()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statistics, other.statistics);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetEncodingStats(), other.isSetEncodingStats());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEncodingStats()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.encoding_stats, other.encoding_stats);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetBloomFilterOffset(), other.isSetBloomFilterOffset());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBloomFilterOffset()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bloom_filter_offset, other.bloom_filter_offset);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetBloomFilterLength(), other.isSetBloomFilterLength());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBloomFilterLength()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bloom_filter_length, other.bloom_filter_length);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSizeStatistics(), other.isSetSizeStatistics());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSizeStatistics()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.size_statistics, other.size_statistics);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetGeospatialStatistics(), other.isSetGeospatialStatistics());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGeospatialStatistics()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.geospatial_statistics, other.geospatial_statistics);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("ColumnMetaData(");
boolean first = true;
sb.append("type:");
if (this.type == null) {
sb.append("null");
} else {
sb.append(this.type);
}
first = false;
if (!first) sb.append(", ");
sb.append("encodings:");
if (this.encodings == null) {
sb.append("null");
} else {
sb.append(this.encodings);
}
first = false;
if (!first) sb.append(", ");
sb.append("path_in_schema:");
if (this.path_in_schema == null) {
sb.append("null");
} else {
sb.append(this.path_in_schema);
}
first = false;
if (!first) sb.append(", ");
sb.append("codec:");
if (this.codec == null) {
sb.append("null");
} else {
sb.append(this.codec);
}
first = false;
if (!first) sb.append(", ");
sb.append("num_values:");
sb.append(this.num_values);
first = false;
if (!first) sb.append(", ");
sb.append("total_uncompressed_size:");
sb.append(this.total_uncompressed_size);
first = false;
if (!first) sb.append(", ");
sb.append("total_compressed_size:");
sb.append(this.total_compressed_size);
first = false;
if (isSetKeyValueMetadata()) {
if (!first) sb.append(", ");
sb.append("key_value_metadata:");
if (this.key_value_metadata == null) {
sb.append("null");
} else {
sb.append(this.key_value_metadata);
}
first = false;
}
if (!first) sb.append(", ");
sb.append("data_page_offset:");
sb.append(this.data_page_offset);
first = false;
if (isSetIndexPageOffset()) {
if (!first) sb.append(", ");
sb.append("index_page_offset:");
sb.append(this.index_page_offset);
first = false;
}
if (isSetDictionaryPageOffset()) {
if (!first) sb.append(", ");
sb.append("dictionary_page_offset:");
sb.append(this.dictionary_page_offset);
first = false;
}
if (isSetStatistics()) {
if (!first) sb.append(", ");
sb.append("statistics:");
if (this.statistics == null) {
sb.append("null");
} else {
sb.append(this.statistics);
}
first = false;
}
if (isSetEncodingStats()) {
if (!first) sb.append(", ");
sb.append("encoding_stats:");
if (this.encoding_stats == null) {
sb.append("null");
} else {
sb.append(this.encoding_stats);
}
first = false;
}
if (isSetBloomFilterOffset()) {
if (!first) sb.append(", ");
sb.append("bloom_filter_offset:");
sb.append(this.bloom_filter_offset);
first = false;
}
if (isSetBloomFilterLength()) {
if (!first) sb.append(", ");
sb.append("bloom_filter_length:");
sb.append(this.bloom_filter_length);
first = false;
}
if (isSetSizeStatistics()) {
if (!first) sb.append(", ");
sb.append("size_statistics:");
if (this.size_statistics == null) {
sb.append("null");
} else {
sb.append(this.size_statistics);
}
first = false;
}
if (isSetGeospatialStatistics()) {
if (!first) sb.append(", ");
sb.append("geospatial_statistics:");
if (this.geospatial_statistics == null) {
sb.append("null");
} else {
sb.append(this.geospatial_statistics);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (type == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not present! Struct: " + toString());
}
if (encodings == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'encodings' was not present! Struct: " + toString());
}
if (path_in_schema == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'path_in_schema' was not present! Struct: " + toString());
}
if (codec == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'codec' was not present! Struct: " + toString());
}
// alas, we cannot check 'num_values' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'total_uncompressed_size' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'total_compressed_size' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'data_page_offset' because it's a primitive and you chose the non-beans generator.
// check for sub-struct validity
if (statistics != null) {
statistics.validate();
}
if (size_statistics != null) {
size_statistics.validate();
}
if (geospatial_statistics != null) {
geospatial_statistics.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class ColumnMetaDataStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ColumnMetaDataStandardScheme getScheme() {
return new ColumnMetaDataStandardScheme();
}
}
private static class ColumnMetaDataStandardScheme extends org.apache.thrift.scheme.StandardScheme<ColumnMetaData> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnMetaData struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.type = org.apache.parquet.format.Type.findByValue(iprot.readI32());
struct.setTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // ENCODINGS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
struct.encodings = new java.util.ArrayList<Encoding>(_list24.size);
@org.apache.thrift.annotation.Nullable Encoding _elem25;
for (int _i26 = 0; _i26 < _list24.size; ++_i26)
{
_elem25 = org.apache.parquet.format.Encoding.findByValue(iprot.readI32());
if (_elem25 != null)
{
struct.encodings.add(_elem25);
}
}
iprot.readListEnd();
}
struct.setEncodingsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // PATH_IN_SCHEMA
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list27 = iprot.readListBegin();
struct.path_in_schema = new java.util.ArrayList<java.lang.String>(_list27.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem28;
for (int _i29 = 0; _i29 < _list27.size; ++_i29)
{
_elem28 = iprot.readString();
struct.path_in_schema.add(_elem28);
}
iprot.readListEnd();
}
struct.setPathInSchemaIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // CODEC
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.codec = org.apache.parquet.format.CompressionCodec.findByValue(iprot.readI32());
struct.setCodecIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // NUM_VALUES
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.num_values = iprot.readI64();
struct.setNumValuesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // TOTAL_UNCOMPRESSED_SIZE
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.total_uncompressed_size = iprot.readI64();
struct.setTotalUncompressedSizeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // TOTAL_COMPRESSED_SIZE
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.total_compressed_size = iprot.readI64();
struct.setTotalCompressedSizeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // KEY_VALUE_METADATA
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list30 = iprot.readListBegin();
struct.key_value_metadata = new java.util.ArrayList<KeyValue>(_list30.size);
@org.apache.thrift.annotation.Nullable KeyValue _elem31;
for (int _i32 = 0; _i32 < _list30.size; ++_i32)
{
_elem31 = new KeyValue();
_elem31.read(iprot);
struct.key_value_metadata.add(_elem31);
}
iprot.readListEnd();
}
struct.setKeyValueMetadataIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // DATA_PAGE_OFFSET
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.data_page_offset = iprot.readI64();
struct.setDataPageOffsetIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // INDEX_PAGE_OFFSET
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.index_page_offset = iprot.readI64();
struct.setIndexPageOffsetIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // DICTIONARY_PAGE_OFFSET
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.dictionary_page_offset = iprot.readI64();
struct.setDictionaryPageOffsetIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 12: // STATISTICS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.statistics = new Statistics();
struct.statistics.read(iprot);
struct.setStatisticsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 13: // ENCODING_STATS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list33 = iprot.readListBegin();
struct.encoding_stats = new java.util.ArrayList<PageEncodingStats>(_list33.size);
@org.apache.thrift.annotation.Nullable PageEncodingStats _elem34;
for (int _i35 = 0; _i35 < _list33.size; ++_i35)
{
_elem34 = new PageEncodingStats();
_elem34.read(iprot);
struct.encoding_stats.add(_elem34);
}
iprot.readListEnd();
}
struct.setEncodingStatsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 14: // BLOOM_FILTER_OFFSET
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.bloom_filter_offset = iprot.readI64();
struct.setBloomFilterOffsetIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 15: // BLOOM_FILTER_LENGTH
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.bloom_filter_length = iprot.readI32();
struct.setBloomFilterLengthIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 16: // SIZE_STATISTICS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.size_statistics = new SizeStatistics();
struct.size_statistics.read(iprot);
struct.setSizeStatisticsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 17: // GEOSPATIAL_STATISTICS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.geospatial_statistics = new GeospatialStatistics();
struct.geospatial_statistics.read(iprot);
struct.setGeospatialStatisticsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
if (!struct.isSetNumValues()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'num_values' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetTotalUncompressedSize()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'total_uncompressed_size' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetTotalCompressedSize()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'total_compressed_size' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetDataPageOffset()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'data_page_offset' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, ColumnMetaData struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.type != null) {
oprot.writeFieldBegin(TYPE_FIELD_DESC);
oprot.writeI32(struct.type.getValue());
oprot.writeFieldEnd();
}
if (struct.encodings != null) {
oprot.writeFieldBegin(ENCODINGS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.encodings.size()));
for (Encoding _iter36 : struct.encodings)
{
oprot.writeI32(_iter36.getValue());
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.path_in_schema != null) {
oprot.writeFieldBegin(PATH_IN_SCHEMA_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.path_in_schema.size()));
for (java.lang.String _iter37 : struct.path_in_schema)
{
oprot.writeString(_iter37);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.codec != null) {
oprot.writeFieldBegin(CODEC_FIELD_DESC);
oprot.writeI32(struct.codec.getValue());
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(NUM_VALUES_FIELD_DESC);
oprot.writeI64(struct.num_values);
oprot.writeFieldEnd();
oprot.writeFieldBegin(TOTAL_UNCOMPRESSED_SIZE_FIELD_DESC);
oprot.writeI64(struct.total_uncompressed_size);
oprot.writeFieldEnd();
oprot.writeFieldBegin(TOTAL_COMPRESSED_SIZE_FIELD_DESC);
oprot.writeI64(struct.total_compressed_size);
oprot.writeFieldEnd();
if (struct.key_value_metadata != null) {
if (struct.isSetKeyValueMetadata()) {
oprot.writeFieldBegin(KEY_VALUE_METADATA_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.key_value_metadata.size()));
for (KeyValue _iter38 : struct.key_value_metadata)
{
_iter38.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldBegin(DATA_PAGE_OFFSET_FIELD_DESC);
oprot.writeI64(struct.data_page_offset);
oprot.writeFieldEnd();
if (struct.isSetIndexPageOffset()) {
oprot.writeFieldBegin(INDEX_PAGE_OFFSET_FIELD_DESC);
oprot.writeI64(struct.index_page_offset);
oprot.writeFieldEnd();
}
if (struct.isSetDictionaryPageOffset()) {
oprot.writeFieldBegin(DICTIONARY_PAGE_OFFSET_FIELD_DESC);
oprot.writeI64(struct.dictionary_page_offset);
oprot.writeFieldEnd();
}
if (struct.statistics != null) {
if (struct.isSetStatistics()) {
oprot.writeFieldBegin(STATISTICS_FIELD_DESC);
struct.statistics.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.encoding_stats != null) {
if (struct.isSetEncodingStats()) {
oprot.writeFieldBegin(ENCODING_STATS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.encoding_stats.size()));
for (PageEncodingStats _iter39 : struct.encoding_stats)
{
_iter39.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.isSetBloomFilterOffset()) {
oprot.writeFieldBegin(BLOOM_FILTER_OFFSET_FIELD_DESC);
oprot.writeI64(struct.bloom_filter_offset);
oprot.writeFieldEnd();
}
if (struct.isSetBloomFilterLength()) {
oprot.writeFieldBegin(BLOOM_FILTER_LENGTH_FIELD_DESC);
oprot.writeI32(struct.bloom_filter_length);
oprot.writeFieldEnd();
}
if (struct.size_statistics != null) {
if (struct.isSetSizeStatistics()) {
oprot.writeFieldBegin(SIZE_STATISTICS_FIELD_DESC);
struct.size_statistics.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.geospatial_statistics != null) {
if (struct.isSetGeospatialStatistics()) {
oprot.writeFieldBegin(GEOSPATIAL_STATISTICS_FIELD_DESC);
struct.geospatial_statistics.write(oprot);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class ColumnMetaDataTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ColumnMetaDataTupleScheme getScheme() {
return new ColumnMetaDataTupleScheme();
}
}
private static class ColumnMetaDataTupleScheme extends org.apache.thrift.scheme.TupleScheme<ColumnMetaData> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ColumnMetaData struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI32(struct.type.getValue());
{
oprot.writeI32(struct.encodings.size());
for (Encoding _iter40 : struct.encodings)
{
oprot.writeI32(_iter40.getValue());
}
}
{
oprot.writeI32(struct.path_in_schema.size());
for (java.lang.String _iter41 : struct.path_in_schema)
{
oprot.writeString(_iter41);
}
}
oprot.writeI32(struct.codec.getValue());
oprot.writeI64(struct.num_values);
oprot.writeI64(struct.total_uncompressed_size);
oprot.writeI64(struct.total_compressed_size);
oprot.writeI64(struct.data_page_offset);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetKeyValueMetadata()) {
optionals.set(0);
}
if (struct.isSetIndexPageOffset()) {
optionals.set(1);
}
if (struct.isSetDictionaryPageOffset()) {
optionals.set(2);
}
if (struct.isSetStatistics()) {
optionals.set(3);
}
if (struct.isSetEncodingStats()) {
optionals.set(4);
}
if (struct.isSetBloomFilterOffset()) {
optionals.set(5);
}
if (struct.isSetBloomFilterLength()) {
optionals.set(6);
}
if (struct.isSetSizeStatistics()) {
optionals.set(7);
}
if (struct.isSetGeospatialStatistics()) {
optionals.set(8);
}
oprot.writeBitSet(optionals, 9);
if (struct.isSetKeyValueMetadata()) {
{
oprot.writeI32(struct.key_value_metadata.size());
for (KeyValue _iter42 : struct.key_value_metadata)
{
_iter42.write(oprot);
}
}
}
if (struct.isSetIndexPageOffset()) {
oprot.writeI64(struct.index_page_offset);
}
if (struct.isSetDictionaryPageOffset()) {
oprot.writeI64(struct.dictionary_page_offset);
}
if (struct.isSetStatistics()) {
struct.statistics.write(oprot);
}
if (struct.isSetEncodingStats()) {
{
oprot.writeI32(struct.encoding_stats.size());
for (PageEncodingStats _iter43 : struct.encoding_stats)
{
_iter43.write(oprot);
}
}
}
if (struct.isSetBloomFilterOffset()) {
oprot.writeI64(struct.bloom_filter_offset);
}
if (struct.isSetBloomFilterLength()) {
oprot.writeI32(struct.bloom_filter_length);
}
if (struct.isSetSizeStatistics()) {
struct.size_statistics.write(oprot);
}
if (struct.isSetGeospatialStatistics()) {
struct.geospatial_statistics.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ColumnMetaData struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.type = org.apache.parquet.format.Type.findByValue(iprot.readI32());
struct.setTypeIsSet(true);
{
org.apache.thrift.protocol.TList _list44 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
struct.encodings = new java.util.ArrayList<Encoding>(_list44.size);
@org.apache.thrift.annotation.Nullable Encoding _elem45;
for (int _i46 = 0; _i46 < _list44.size; ++_i46)
{
_elem45 = org.apache.parquet.format.Encoding.findByValue(iprot.readI32());
if (_elem45 != null)
{
struct.encodings.add(_elem45);
}
}
}
struct.setEncodingsIsSet(true);
{
org.apache.thrift.protocol.TList _list47 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.path_in_schema = new java.util.ArrayList<java.lang.String>(_list47.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem48;
for (int _i49 = 0; _i49 < _list47.size; ++_i49)
{
_elem48 = iprot.readString();
struct.path_in_schema.add(_elem48);
}
}
struct.setPathInSchemaIsSet(true);
struct.codec = org.apache.parquet.format.CompressionCodec.findByValue(iprot.readI32());
struct.setCodecIsSet(true);
struct.num_values = iprot.readI64();
struct.setNumValuesIsSet(true);
struct.total_uncompressed_size = iprot.readI64();
struct.setTotalUncompressedSizeIsSet(true);
struct.total_compressed_size = iprot.readI64();
struct.setTotalCompressedSizeIsSet(true);
struct.data_page_offset = iprot.readI64();
struct.setDataPageOffsetIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(9);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list50 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.key_value_metadata = new java.util.ArrayList<KeyValue>(_list50.size);
@org.apache.thrift.annotation.Nullable KeyValue _elem51;
for (int _i52 = 0; _i52 < _list50.size; ++_i52)
{
_elem51 = new KeyValue();
_elem51.read(iprot);
struct.key_value_metadata.add(_elem51);
}
}
struct.setKeyValueMetadataIsSet(true);
}
if (incoming.get(1)) {
struct.index_page_offset = iprot.readI64();
struct.setIndexPageOffsetIsSet(true);
}
if (incoming.get(2)) {
struct.dictionary_page_offset = iprot.readI64();
struct.setDictionaryPageOffsetIsSet(true);
}
if (incoming.get(3)) {
struct.statistics = new Statistics();
struct.statistics.read(iprot);
struct.setStatisticsIsSet(true);
}
if (incoming.get(4)) {
{
org.apache.thrift.protocol.TList _list53 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.encoding_stats = new java.util.ArrayList<PageEncodingStats>(_list53.size);
@org.apache.thrift.annotation.Nullable PageEncodingStats _elem54;
for (int _i55 = 0; _i55 < _list53.size; ++_i55)
{
_elem54 = new PageEncodingStats();
_elem54.read(iprot);
struct.encoding_stats.add(_elem54);
}
}
struct.setEncodingStatsIsSet(true);
}
if (incoming.get(5)) {
struct.bloom_filter_offset = iprot.readI64();
struct.setBloomFilterOffsetIsSet(true);
}
if (incoming.get(6)) {
struct.bloom_filter_length = iprot.readI32();
struct.setBloomFilterLengthIsSet(true);
}
if (incoming.get(7)) {
struct.size_statistics = new SizeStatistics();
struct.size_statistics.read(iprot);
struct.setSizeStatisticsIsSet(true);
}
if (incoming.get(8)) {
struct.geospatial_statistics = new GeospatialStatistics();
struct.geospatial_statistics.read(iprot);
struct.setGeospatialStatisticsIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}