Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* 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 ColumnIndex.
* Each [i] refers to the page at OffsetIndex.page_locations[i]
*/
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)", date = "2023-05-12")
public class ColumnIndex 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("ColumnIndex");
private static final org.apache.thrift.protocol.TField NULL_PAGES_FIELD_DESC = new org.apache.thrift.protocol.TField("null_pages", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField MIN_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("min_values", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField MAX_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("max_values", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField BOUNDARY_ORDER_FIELD_DESC = new org.apache.thrift.protocol.TField("boundary_order", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField NULL_COUNTS_FIELD_DESC = new org.apache.thrift.protocol.TField("null_counts", org.apache.thrift.protocol.TType.LIST, (short)5);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ColumnIndexStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ColumnIndexTupleSchemeFactory();
/**
* A list of Boolean values to determine the validity of the corresponding
* min and max values. If true, a page contains only null values, and writers
* have to set the corresponding entries in min_values and max_values to
* byte[0], so that all lists have the same length. If false, the
* corresponding entries in min_values and max_values must be valid.
*/
public @org.apache.thrift.annotation.Nullable java.util.List null_pages; // required
/**
* Two lists containing lower and upper bounds for the values of each page.
* These may be the actual minimum and maximum values found on a page, but
* can also be (more compact) values that do not exist on a page. For
* example, instead of storing ""Blart Versenwald III", a writer may set
* min_values[i]="B", max_values[i]="C". Such more compact values must still
* be valid values within the column's logical type. Readers must make sure
* that list entries are populated before using them by inspecting null_pages.
*/
public @org.apache.thrift.annotation.Nullable java.util.List min_values; // required
public @org.apache.thrift.annotation.Nullable java.util.List max_values; // required
/**
* Stores whether both min_values and max_values are orderd and if so, in
* which direction. This allows readers to perform binary searches in both
* lists. Readers cannot assume that max_values[i] <= min_values[i+1], even
* if the lists are ordered.
*
* @see BoundaryOrder
*/
public @org.apache.thrift.annotation.Nullable BoundaryOrder boundary_order; // required
/**
* A list containing the number of null values for each page *
*/
public @org.apache.thrift.annotation.Nullable java.util.List null_counts; // 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 {
/**
* A list of Boolean values to determine the validity of the corresponding
* min and max values. If true, a page contains only null values, and writers
* have to set the corresponding entries in min_values and max_values to
* byte[0], so that all lists have the same length. If false, the
* corresponding entries in min_values and max_values must be valid.
*/
NULL_PAGES((short)1, "null_pages"),
/**
* Two lists containing lower and upper bounds for the values of each page.
* These may be the actual minimum and maximum values found on a page, but
* can also be (more compact) values that do not exist on a page. For
* example, instead of storing ""Blart Versenwald III", a writer may set
* min_values[i]="B", max_values[i]="C". Such more compact values must still
* be valid values within the column's logical type. Readers must make sure
* that list entries are populated before using them by inspecting null_pages.
*/
MIN_VALUES((short)2, "min_values"),
MAX_VALUES((short)3, "max_values"),
/**
* Stores whether both min_values and max_values are orderd and if so, in
* which direction. This allows readers to perform binary searches in both
* lists. Readers cannot assume that max_values[i] <= min_values[i+1], even
* if the lists are ordered.
*
* @see BoundaryOrder
*/
BOUNDARY_ORDER((short)4, "boundary_order"),
/**
* A list containing the number of null values for each page *
*/
NULL_COUNTS((short)5, "null_counts");
private static final java.util.Map byName = new java.util.HashMap();
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: // NULL_PAGES
return NULL_PAGES;
case 2: // MIN_VALUES
return MIN_VALUES;
case 3: // MAX_VALUES
return MAX_VALUES;
case 4: // BOUNDARY_ORDER
return BOUNDARY_ORDER;
case 5: // NULL_COUNTS
return NULL_COUNTS;
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 _Fields optionals[] = {_Fields.NULL_COUNTS};
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.NULL_PAGES, new org.apache.thrift.meta_data.FieldMetaData("null_pages", 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.BOOL))));
tmpMap.put(_Fields.MIN_VALUES, new org.apache.thrift.meta_data.FieldMetaData("min_values", 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 , true))));
tmpMap.put(_Fields.MAX_VALUES, new org.apache.thrift.meta_data.FieldMetaData("max_values", 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 , true))));
tmpMap.put(_Fields.BOUNDARY_ORDER, new org.apache.thrift.meta_data.FieldMetaData("boundary_order", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, BoundaryOrder.class)));
tmpMap.put(_Fields.NULL_COUNTS, new org.apache.thrift.meta_data.FieldMetaData("null_counts", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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.I64))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnIndex.class, metaDataMap);
}
public ColumnIndex() {
}
public ColumnIndex(
java.util.List null_pages,
java.util.List min_values,
java.util.List max_values,
BoundaryOrder boundary_order)
{
this();
this.null_pages = null_pages;
this.min_values = min_values;
this.max_values = max_values;
this.boundary_order = boundary_order;
}
/**
* Performs a deep copy on other.
*/
public ColumnIndex(ColumnIndex other) {
if (other.isSetNull_pages()) {
java.util.List __this__null_pages = new java.util.ArrayList(other.null_pages);
this.null_pages = __this__null_pages;
}
if (other.isSetMin_values()) {
java.util.List __this__min_values = new java.util.ArrayList(other.min_values);
this.min_values = __this__min_values;
}
if (other.isSetMax_values()) {
java.util.List __this__max_values = new java.util.ArrayList(other.max_values);
this.max_values = __this__max_values;
}
if (other.isSetBoundary_order()) {
this.boundary_order = other.boundary_order;
}
if (other.isSetNull_counts()) {
java.util.List __this__null_counts = new java.util.ArrayList(other.null_counts);
this.null_counts = __this__null_counts;
}
}
public ColumnIndex deepCopy() {
return new ColumnIndex(this);
}
@Override
public void clear() {
this.null_pages = null;
this.min_values = null;
this.max_values = null;
this.boundary_order = null;
this.null_counts = null;
}
public int getNull_pagesSize() {
return (this.null_pages == null) ? 0 : this.null_pages.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator getNull_pagesIterator() {
return (this.null_pages == null) ? null : this.null_pages.iterator();
}
public void addToNull_pages(boolean elem) {
if (this.null_pages == null) {
this.null_pages = new java.util.ArrayList();
}
this.null_pages.add(elem);
}
/**
* A list of Boolean values to determine the validity of the corresponding
* min and max values. If true, a page contains only null values, and writers
* have to set the corresponding entries in min_values and max_values to
* byte[0], so that all lists have the same length. If false, the
* corresponding entries in min_values and max_values must be valid.
*/
@org.apache.thrift.annotation.Nullable
public java.util.List getNull_pages() {
return this.null_pages;
}
/**
* A list of Boolean values to determine the validity of the corresponding
* min and max values. If true, a page contains only null values, and writers
* have to set the corresponding entries in min_values and max_values to
* byte[0], so that all lists have the same length. If false, the
* corresponding entries in min_values and max_values must be valid.
*/
public ColumnIndex setNull_pages(@org.apache.thrift.annotation.Nullable java.util.List null_pages) {
this.null_pages = null_pages;
return this;
}
public void unsetNull_pages() {
this.null_pages = null;
}
/** Returns true if field null_pages is set (has been assigned a value) and false otherwise */
public boolean isSetNull_pages() {
return this.null_pages != null;
}
public void setNull_pagesIsSet(boolean value) {
if (!value) {
this.null_pages = null;
}
}
public int getMin_valuesSize() {
return (this.min_values == null) ? 0 : this.min_values.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator getMin_valuesIterator() {
return (this.min_values == null) ? null : this.min_values.iterator();
}
public void addToMin_values(java.nio.ByteBuffer elem) {
if (this.min_values == null) {
this.min_values = new java.util.ArrayList();
}
this.min_values.add(elem);
}
/**
* Two lists containing lower and upper bounds for the values of each page.
* These may be the actual minimum and maximum values found on a page, but
* can also be (more compact) values that do not exist on a page. For
* example, instead of storing ""Blart Versenwald III", a writer may set
* min_values[i]="B", max_values[i]="C". Such more compact values must still
* be valid values within the column's logical type. Readers must make sure
* that list entries are populated before using them by inspecting null_pages.
*/
@org.apache.thrift.annotation.Nullable
public java.util.List getMin_values() {
return this.min_values;
}
/**
* Two lists containing lower and upper bounds for the values of each page.
* These may be the actual minimum and maximum values found on a page, but
* can also be (more compact) values that do not exist on a page. For
* example, instead of storing ""Blart Versenwald III", a writer may set
* min_values[i]="B", max_values[i]="C". Such more compact values must still
* be valid values within the column's logical type. Readers must make sure
* that list entries are populated before using them by inspecting null_pages.
*/
public ColumnIndex setMin_values(@org.apache.thrift.annotation.Nullable java.util.List min_values) {
this.min_values = min_values;
return this;
}
public void unsetMin_values() {
this.min_values = null;
}
/** Returns true if field min_values is set (has been assigned a value) and false otherwise */
public boolean isSetMin_values() {
return this.min_values != null;
}
public void setMin_valuesIsSet(boolean value) {
if (!value) {
this.min_values = null;
}
}
public int getMax_valuesSize() {
return (this.max_values == null) ? 0 : this.max_values.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator getMax_valuesIterator() {
return (this.max_values == null) ? null : this.max_values.iterator();
}
public void addToMax_values(java.nio.ByteBuffer elem) {
if (this.max_values == null) {
this.max_values = new java.util.ArrayList();
}
this.max_values.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List getMax_values() {
return this.max_values;
}
public ColumnIndex setMax_values(@org.apache.thrift.annotation.Nullable java.util.List max_values) {
this.max_values = max_values;
return this;
}
public void unsetMax_values() {
this.max_values = null;
}
/** Returns true if field max_values is set (has been assigned a value) and false otherwise */
public boolean isSetMax_values() {
return this.max_values != null;
}
public void setMax_valuesIsSet(boolean value) {
if (!value) {
this.max_values = null;
}
}
/**
* Stores whether both min_values and max_values are orderd and if so, in
* which direction. This allows readers to perform binary searches in both
* lists. Readers cannot assume that max_values[i] <= min_values[i+1], even
* if the lists are ordered.
*
* @see BoundaryOrder
*/
@org.apache.thrift.annotation.Nullable
public BoundaryOrder getBoundary_order() {
return this.boundary_order;
}
/**
* Stores whether both min_values and max_values are orderd and if so, in
* which direction. This allows readers to perform binary searches in both
* lists. Readers cannot assume that max_values[i] <= min_values[i+1], even
* if the lists are ordered.
*
* @see BoundaryOrder
*/
public ColumnIndex setBoundary_order(@org.apache.thrift.annotation.Nullable BoundaryOrder boundary_order) {
this.boundary_order = boundary_order;
return this;
}
public void unsetBoundary_order() {
this.boundary_order = null;
}
/** Returns true if field boundary_order is set (has been assigned a value) and false otherwise */
public boolean isSetBoundary_order() {
return this.boundary_order != null;
}
public void setBoundary_orderIsSet(boolean value) {
if (!value) {
this.boundary_order = null;
}
}
public int getNull_countsSize() {
return (this.null_counts == null) ? 0 : this.null_counts.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator getNull_countsIterator() {
return (this.null_counts == null) ? null : this.null_counts.iterator();
}
public void addToNull_counts(long elem) {
if (this.null_counts == null) {
this.null_counts = new java.util.ArrayList();
}
this.null_counts.add(elem);
}
/**
* A list containing the number of null values for each page *
*/
@org.apache.thrift.annotation.Nullable
public java.util.List getNull_counts() {
return this.null_counts;
}
/**
* A list containing the number of null values for each page *
*/
public ColumnIndex setNull_counts(@org.apache.thrift.annotation.Nullable java.util.List null_counts) {
this.null_counts = null_counts;
return this;
}
public void unsetNull_counts() {
this.null_counts = null;
}
/** Returns true if field null_counts is set (has been assigned a value) and false otherwise */
public boolean isSetNull_counts() {
return this.null_counts != null;
}
public void setNull_countsIsSet(boolean value) {
if (!value) {
this.null_counts = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case NULL_PAGES:
if (value == null) {
unsetNull_pages();
} else {
setNull_pages((java.util.List)value);
}
break;
case MIN_VALUES:
if (value == null) {
unsetMin_values();
} else {
setMin_values((java.util.List)value);
}
break;
case MAX_VALUES:
if (value == null) {
unsetMax_values();
} else {
setMax_values((java.util.List)value);
}
break;
case BOUNDARY_ORDER:
if (value == null) {
unsetBoundary_order();
} else {
setBoundary_order((BoundaryOrder)value);
}
break;
case NULL_COUNTS:
if (value == null) {
unsetNull_counts();
} else {
setNull_counts((java.util.List)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NULL_PAGES:
return getNull_pages();
case MIN_VALUES:
return getMin_values();
case MAX_VALUES:
return getMax_values();
case BOUNDARY_ORDER:
return getBoundary_order();
case NULL_COUNTS:
return getNull_counts();
}
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 NULL_PAGES:
return isSetNull_pages();
case MIN_VALUES:
return isSetMin_values();
case MAX_VALUES:
return isSetMax_values();
case BOUNDARY_ORDER:
return isSetBoundary_order();
case NULL_COUNTS:
return isSetNull_counts();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof ColumnIndex)
return this.equals((ColumnIndex)that);
return false;
}
public boolean equals(ColumnIndex that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_null_pages = true && this.isSetNull_pages();
boolean that_present_null_pages = true && that.isSetNull_pages();
if (this_present_null_pages || that_present_null_pages) {
if (!(this_present_null_pages && that_present_null_pages))
return false;
if (!this.null_pages.equals(that.null_pages))
return false;
}
boolean this_present_min_values = true && this.isSetMin_values();
boolean that_present_min_values = true && that.isSetMin_values();
if (this_present_min_values || that_present_min_values) {
if (!(this_present_min_values && that_present_min_values))
return false;
if (!this.min_values.equals(that.min_values))
return false;
}
boolean this_present_max_values = true && this.isSetMax_values();
boolean that_present_max_values = true && that.isSetMax_values();
if (this_present_max_values || that_present_max_values) {
if (!(this_present_max_values && that_present_max_values))
return false;
if (!this.max_values.equals(that.max_values))
return false;
}
boolean this_present_boundary_order = true && this.isSetBoundary_order();
boolean that_present_boundary_order = true && that.isSetBoundary_order();
if (this_present_boundary_order || that_present_boundary_order) {
if (!(this_present_boundary_order && that_present_boundary_order))
return false;
if (!this.boundary_order.equals(that.boundary_order))
return false;
}
boolean this_present_null_counts = true && this.isSetNull_counts();
boolean that_present_null_counts = true && that.isSetNull_counts();
if (this_present_null_counts || that_present_null_counts) {
if (!(this_present_null_counts && that_present_null_counts))
return false;
if (!this.null_counts.equals(that.null_counts))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetNull_pages()) ? 131071 : 524287);
if (isSetNull_pages())
hashCode = hashCode * 8191 + null_pages.hashCode();
hashCode = hashCode * 8191 + ((isSetMin_values()) ? 131071 : 524287);
if (isSetMin_values())
hashCode = hashCode * 8191 + min_values.hashCode();
hashCode = hashCode * 8191 + ((isSetMax_values()) ? 131071 : 524287);
if (isSetMax_values())
hashCode = hashCode * 8191 + max_values.hashCode();
hashCode = hashCode * 8191 + ((isSetBoundary_order()) ? 131071 : 524287);
if (isSetBoundary_order())
hashCode = hashCode * 8191 + boundary_order.getValue();
hashCode = hashCode * 8191 + ((isSetNull_counts()) ? 131071 : 524287);
if (isSetNull_counts())
hashCode = hashCode * 8191 + null_counts.hashCode();
return hashCode;
}
@Override
public int compareTo(ColumnIndex other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetNull_pages(), other.isSetNull_pages());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNull_pages()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.null_pages, other.null_pages);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMin_values(), other.isSetMin_values());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMin_values()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.min_values, other.min_values);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMax_values(), other.isSetMax_values());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMax_values()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_values, other.max_values);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetBoundary_order(), other.isSetBoundary_order());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBoundary_order()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.boundary_order, other.boundary_order);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetNull_counts(), other.isSetNull_counts());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNull_counts()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.null_counts, other.null_counts);
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("ColumnIndex(");
boolean first = true;
sb.append("null_pages:");
if (this.null_pages == null) {
sb.append("null");
} else {
sb.append(this.null_pages);
}
first = false;
if (!first) sb.append(", ");
sb.append("min_values:");
if (this.min_values == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.min_values, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("max_values:");
if (this.max_values == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.max_values, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("boundary_order:");
if (this.boundary_order == null) {
sb.append("null");
} else {
sb.append(this.boundary_order);
}
first = false;
if (isSetNull_counts()) {
if (!first) sb.append(", ");
sb.append("null_counts:");
if (this.null_counts == null) {
sb.append("null");
} else {
sb.append(this.null_counts);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (null_pages == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'null_pages' was not present! Struct: " + toString());
}
if (min_values == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'min_values' was not present! Struct: " + toString());
}
if (max_values == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'max_values' was not present! Struct: " + toString());
}
if (boundary_order == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'boundary_order' was not present! Struct: " + toString());
}
// check for sub-struct validity
}
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 {
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 ColumnIndexStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ColumnIndexStandardScheme getScheme() {
return new ColumnIndexStandardScheme();
}
}
private static class ColumnIndexStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnIndex 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: // NULL_PAGES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list64 = iprot.readListBegin();
struct.null_pages = new java.util.ArrayList(_list64.size);
boolean _elem65;
for (int _i66 = 0; _i66 < _list64.size; ++_i66)
{
_elem65 = iprot.readBool();
struct.null_pages.add(_elem65);
}
iprot.readListEnd();
}
struct.setNull_pagesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // MIN_VALUES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list67 = iprot.readListBegin();
struct.min_values = new java.util.ArrayList(_list67.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem68;
for (int _i69 = 0; _i69 < _list67.size; ++_i69)
{
_elem68 = iprot.readBinary();
struct.min_values.add(_elem68);
}
iprot.readListEnd();
}
struct.setMin_valuesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // MAX_VALUES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list70 = iprot.readListBegin();
struct.max_values = new java.util.ArrayList(_list70.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem71;
for (int _i72 = 0; _i72 < _list70.size; ++_i72)
{
_elem71 = iprot.readBinary();
struct.max_values.add(_elem71);
}
iprot.readListEnd();
}
struct.setMax_valuesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // BOUNDARY_ORDER
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.boundary_order = org.apache.parquet.format.BoundaryOrder.findByValue(iprot.readI32());
struct.setBoundary_orderIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // NULL_COUNTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list73 = iprot.readListBegin();
struct.null_counts = new java.util.ArrayList(_list73.size);
long _elem74;
for (int _i75 = 0; _i75 < _list73.size; ++_i75)
{
_elem74 = iprot.readI64();
struct.null_counts.add(_elem74);
}
iprot.readListEnd();
}
struct.setNull_countsIsSet(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
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, ColumnIndex struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.null_pages != null) {
oprot.writeFieldBegin(NULL_PAGES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BOOL, struct.null_pages.size()));
for (boolean _iter76 : struct.null_pages)
{
oprot.writeBool(_iter76);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.min_values != null) {
oprot.writeFieldBegin(MIN_VALUES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.min_values.size()));
for (java.nio.ByteBuffer _iter77 : struct.min_values)
{
oprot.writeBinary(_iter77);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.max_values != null) {
oprot.writeFieldBegin(MAX_VALUES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.max_values.size()));
for (java.nio.ByteBuffer _iter78 : struct.max_values)
{
oprot.writeBinary(_iter78);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.boundary_order != null) {
oprot.writeFieldBegin(BOUNDARY_ORDER_FIELD_DESC);
oprot.writeI32(struct.boundary_order.getValue());
oprot.writeFieldEnd();
}
if (struct.null_counts != null) {
if (struct.isSetNull_counts()) {
oprot.writeFieldBegin(NULL_COUNTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.null_counts.size()));
for (long _iter79 : struct.null_counts)
{
oprot.writeI64(_iter79);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class ColumnIndexTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ColumnIndexTupleScheme getScheme() {
return new ColumnIndexTupleScheme();
}
}
private static class ColumnIndexTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ColumnIndex struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
oprot.writeI32(struct.null_pages.size());
for (boolean _iter80 : struct.null_pages)
{
oprot.writeBool(_iter80);
}
}
{
oprot.writeI32(struct.min_values.size());
for (java.nio.ByteBuffer _iter81 : struct.min_values)
{
oprot.writeBinary(_iter81);
}
}
{
oprot.writeI32(struct.max_values.size());
for (java.nio.ByteBuffer _iter82 : struct.max_values)
{
oprot.writeBinary(_iter82);
}
}
oprot.writeI32(struct.boundary_order.getValue());
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetNull_counts()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetNull_counts()) {
{
oprot.writeI32(struct.null_counts.size());
for (long _iter83 : struct.null_counts)
{
oprot.writeI64(_iter83);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ColumnIndex struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
org.apache.thrift.protocol.TList _list84 = iprot.readListBegin(org.apache.thrift.protocol.TType.BOOL);
struct.null_pages = new java.util.ArrayList(_list84.size);
boolean _elem85;
for (int _i86 = 0; _i86 < _list84.size; ++_i86)
{
_elem85 = iprot.readBool();
struct.null_pages.add(_elem85);
}
}
struct.setNull_pagesIsSet(true);
{
org.apache.thrift.protocol.TList _list87 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.min_values = new java.util.ArrayList(_list87.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem88;
for (int _i89 = 0; _i89 < _list87.size; ++_i89)
{
_elem88 = iprot.readBinary();
struct.min_values.add(_elem88);
}
}
struct.setMin_valuesIsSet(true);
{
org.apache.thrift.protocol.TList _list90 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.max_values = new java.util.ArrayList(_list90.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem91;
for (int _i92 = 0; _i92 < _list90.size; ++_i92)
{
_elem91 = iprot.readBinary();
struct.max_values.add(_elem91);
}
}
struct.setMax_valuesIsSet(true);
struct.boundary_order = org.apache.parquet.format.BoundaryOrder.findByValue(iprot.readI32());
struct.setBoundary_orderIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list93 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
struct.null_counts = new java.util.ArrayList(_list93.size);
long _elem94;
for (int _i95 = 0; _i95 < _list93.size; ++_i95)
{
_elem94 = iprot.readI64();
struct.null_counts.add(_elem94);
}
}
struct.setNull_countsIsSet(true);
}
}
}
private static 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();
}
}