All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.parquet.format.SchemaElement Maven / Gradle / Ivy

/**
 * Autogenerated by Thrift Compiler (0.9.3)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.apache.parquet.format;

import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;

import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import com.facebook.presto.hive.$internal.org.slf4j.Logger;
import com.facebook.presto.hive.$internal.org.slf4j.LoggerFactory;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
 * Represents a element inside a schema definition.
 *  - if it is a group (inner node) then type is undefined and num_children is defined
 *  - if it is a primitive type (leaf) then type is defined and num_children is undefined
 * the nodes are listed in depth first traversal order.
 */
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2017-10-17")
public class SchemaElement 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("SchemaElement");

  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 TYPE_LENGTH_FIELD_DESC = new org.apache.thrift.protocol.TField("type_length", org.apache.thrift.protocol.TType.I32, (short)2);
  private static final org.apache.thrift.protocol.TField REPETITION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("repetition_type", org.apache.thrift.protocol.TType.I32, (short)3);
  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField NUM_CHILDREN_FIELD_DESC = new org.apache.thrift.protocol.TField("num_children", org.apache.thrift.protocol.TType.I32, (short)5);
  private static final org.apache.thrift.protocol.TField CONVERTED_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("converted_type", org.apache.thrift.protocol.TType.I32, (short)6);
  private static final org.apache.thrift.protocol.TField SCALE_FIELD_DESC = new org.apache.thrift.protocol.TField("scale", org.apache.thrift.protocol.TType.I32, (short)7);
  private static final org.apache.thrift.protocol.TField PRECISION_FIELD_DESC = new org.apache.thrift.protocol.TField("precision", org.apache.thrift.protocol.TType.I32, (short)8);
  private static final org.apache.thrift.protocol.TField FIELD_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("field_id", org.apache.thrift.protocol.TType.I32, (short)9);
  private static final org.apache.thrift.protocol.TField LOGICAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("logicalType", org.apache.thrift.protocol.TType.STRUCT, (short)10);

  private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
  static {
    schemes.put(StandardScheme.class, new SchemaElementStandardSchemeFactory());
    schemes.put(TupleScheme.class, new SchemaElementTupleSchemeFactory());
  }

  /**
   * Data type for this field. Not set if the current element is a non-leaf node
   * 
   * @see Type
   */
  public Type type; // optional
  /**
   * If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the vales.
   * Otherwise, if specified, this is the maximum bit length to store any of the values.
   * (e.g. a low cardinality INT col could have this set to 3).  Note that this is
   * in the schema, and therefore fixed for the entire file.
   */
  public int type_length; // optional
  /**
   * repetition of the field. The root of the schema does not have a repetition_type.
   * All other nodes must have one
   * 
   * @see FieldRepetitionType
   */
  public FieldRepetitionType repetition_type; // optional
  /**
   * Name of the field in the schema
   */
  public String name; // required
  /**
   * Nested fields.  Since thrift does not support nested fields,
   * the nesting is flattened to a single list by a depth-first traversal.
   * The children count is used to construct the nested relationship.
   * This field is not set when the element is a primitive type
   */
  public int num_children; // optional
  /**
   * When the schema is the result of a conversion from another model
   * Used to record the original type to help with cross conversion.
   * 
   * @see ConvertedType
   */
  public ConvertedType converted_type; // optional
  /**
   * Used when this column contains decimal data.
   * See the DECIMAL converted type for more details.
   */
  public int scale; // optional
  public int precision; // optional
  /**
   * When the original schema supports field ids, this will save the
   * original field id in the parquet schema
   */
  public int field_id; // optional
  /**
   * The logical type of this SchemaElement; only valid for primitives.
   * 
   * LogicalType replaces ConvertedType, but ConvertedType is still required
   * for some logical types to ensure forward-compatibility in format v1.
   */
  public LogicalType logicalType; // 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 {
    /**
     * Data type for this field. Not set if the current element is a non-leaf node
     * 
     * @see Type
     */
    TYPE((short)1, "type"),
    /**
     * If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the vales.
     * Otherwise, if specified, this is the maximum bit length to store any of the values.
     * (e.g. a low cardinality INT col could have this set to 3).  Note that this is
     * in the schema, and therefore fixed for the entire file.
     */
    TYPE_LENGTH((short)2, "type_length"),
    /**
     * repetition of the field. The root of the schema does not have a repetition_type.
     * All other nodes must have one
     * 
     * @see FieldRepetitionType
     */
    REPETITION_TYPE((short)3, "repetition_type"),
    /**
     * Name of the field in the schema
     */
    NAME((short)4, "name"),
    /**
     * Nested fields.  Since thrift does not support nested fields,
     * the nesting is flattened to a single list by a depth-first traversal.
     * The children count is used to construct the nested relationship.
     * This field is not set when the element is a primitive type
     */
    NUM_CHILDREN((short)5, "num_children"),
    /**
     * When the schema is the result of a conversion from another model
     * Used to record the original type to help with cross conversion.
     * 
     * @see ConvertedType
     */
    CONVERTED_TYPE((short)6, "converted_type"),
    /**
     * Used when this column contains decimal data.
     * See the DECIMAL converted type for more details.
     */
    SCALE((short)7, "scale"),
    PRECISION((short)8, "precision"),
    /**
     * When the original schema supports field ids, this will save the
     * original field id in the parquet schema
     */
    FIELD_ID((short)9, "field_id"),
    /**
     * The logical type of this SchemaElement; only valid for primitives.
     * 
     * LogicalType replaces ConvertedType, but ConvertedType is still required
     * for some logical types to ensure forward-compatibility in format v1.
     */
    LOGICAL_TYPE((short)10, "logicalType");

    private static final Map byName = new HashMap();

    static {
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // TYPE
          return TYPE;
        case 2: // TYPE_LENGTH
          return TYPE_LENGTH;
        case 3: // REPETITION_TYPE
          return REPETITION_TYPE;
        case 4: // NAME
          return NAME;
        case 5: // NUM_CHILDREN
          return NUM_CHILDREN;
        case 6: // CONVERTED_TYPE
          return CONVERTED_TYPE;
        case 7: // SCALE
          return SCALE;
        case 8: // PRECISION
          return PRECISION;
        case 9: // FIELD_ID
          return FIELD_ID;
        case 10: // LOGICAL_TYPE
          return LOGICAL_TYPE;
        default:
          return null;
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, throwing an exception
     * if it is not found.
     */
    public static _Fields findByThriftIdOrThrow(int fieldId) {
      _Fields fields = findByThriftId(fieldId);
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    public static _Fields findByName(String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final String _fieldName;

    _Fields(short thriftId, String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    public short getThriftFieldId() {
      return _thriftId;
    }

    public String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final int __TYPE_LENGTH_ISSET_ID = 0;
  private static final int __NUM_CHILDREN_ISSET_ID = 1;
  private static final int __SCALE_ISSET_ID = 2;
  private static final int __PRECISION_ISSET_ID = 3;
  private static final int __FIELD_ID_ISSET_ID = 4;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.TYPE,_Fields.TYPE_LENGTH,_Fields.REPETITION_TYPE,_Fields.NUM_CHILDREN,_Fields.CONVERTED_TYPE,_Fields.SCALE,_Fields.PRECISION,_Fields.FIELD_ID,_Fields.LOGICAL_TYPE};
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, Type.class)));
    tmpMap.put(_Fields.TYPE_LENGTH, new org.apache.thrift.meta_data.FieldMetaData("type_length", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.REPETITION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("repetition_type", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, FieldRepetitionType.class)));
    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.NUM_CHILDREN, new org.apache.thrift.meta_data.FieldMetaData("num_children", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.CONVERTED_TYPE, new org.apache.thrift.meta_data.FieldMetaData("converted_type", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ConvertedType.class)));
    tmpMap.put(_Fields.SCALE, new org.apache.thrift.meta_data.FieldMetaData("scale", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.PRECISION, new org.apache.thrift.meta_data.FieldMetaData("precision", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.FIELD_ID, new org.apache.thrift.meta_data.FieldMetaData("field_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.LOGICAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("logicalType", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LogicalType.class)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SchemaElement.class, metaDataMap);
  }

  public SchemaElement() {
  }

  public SchemaElement(
    String name)
  {
    this();
    this.name = name;
  }

  /**
   * Performs a deep copy on other.
   */
  public SchemaElement(SchemaElement other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetType()) {
      this.type = other.type;
    }
    this.type_length = other.type_length;
    if (other.isSetRepetition_type()) {
      this.repetition_type = other.repetition_type;
    }
    if (other.isSetName()) {
      this.name = other.name;
    }
    this.num_children = other.num_children;
    if (other.isSetConverted_type()) {
      this.converted_type = other.converted_type;
    }
    this.scale = other.scale;
    this.precision = other.precision;
    this.field_id = other.field_id;
    if (other.isSetLogicalType()) {
      this.logicalType = new LogicalType(other.logicalType);
    }
  }

  public SchemaElement deepCopy() {
    return new SchemaElement(this);
  }

  @Override
  public void clear() {
    this.type = null;
    setType_lengthIsSet(false);
    this.type_length = 0;
    this.repetition_type = null;
    this.name = null;
    setNum_childrenIsSet(false);
    this.num_children = 0;
    this.converted_type = null;
    setScaleIsSet(false);
    this.scale = 0;
    setPrecisionIsSet(false);
    this.precision = 0;
    setField_idIsSet(false);
    this.field_id = 0;
    this.logicalType = null;
  }

  /**
   * Data type for this field. Not set if the current element is a non-leaf node
   * 
   * @see Type
   */
  public Type getType() {
    return this.type;
  }

  /**
   * Data type for this field. Not set if the current element is a non-leaf node
   * 
   * @see Type
   */
  public SchemaElement setType(Type type) {
    this.type = type;
    return this;
  }

  public void unsetType() {
    this.type = null;
  }

  /** Returns true if field type is set (has been assigned a value) and false otherwise */
  public boolean isSetType() {
    return this.type != null;
  }

  public void setTypeIsSet(boolean value) {
    if (!value) {
      this.type = null;
    }
  }

  /**
   * If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the vales.
   * Otherwise, if specified, this is the maximum bit length to store any of the values.
   * (e.g. a low cardinality INT col could have this set to 3).  Note that this is
   * in the schema, and therefore fixed for the entire file.
   */
  public int getType_length() {
    return this.type_length;
  }

  /**
   * If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the vales.
   * Otherwise, if specified, this is the maximum bit length to store any of the values.
   * (e.g. a low cardinality INT col could have this set to 3).  Note that this is
   * in the schema, and therefore fixed for the entire file.
   */
  public SchemaElement setType_length(int type_length) {
    this.type_length = type_length;
    setType_lengthIsSet(true);
    return this;
  }

  public void unsetType_length() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TYPE_LENGTH_ISSET_ID);
  }

  /** Returns true if field type_length is set (has been assigned a value) and false otherwise */
  public boolean isSetType_length() {
    return EncodingUtils.testBit(__isset_bitfield, __TYPE_LENGTH_ISSET_ID);
  }

  public void setType_lengthIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TYPE_LENGTH_ISSET_ID, value);
  }

  /**
   * repetition of the field. The root of the schema does not have a repetition_type.
   * All other nodes must have one
   * 
   * @see FieldRepetitionType
   */
  public FieldRepetitionType getRepetition_type() {
    return this.repetition_type;
  }

  /**
   * repetition of the field. The root of the schema does not have a repetition_type.
   * All other nodes must have one
   * 
   * @see FieldRepetitionType
   */
  public SchemaElement setRepetition_type(FieldRepetitionType repetition_type) {
    this.repetition_type = repetition_type;
    return this;
  }

  public void unsetRepetition_type() {
    this.repetition_type = null;
  }

  /** Returns true if field repetition_type is set (has been assigned a value) and false otherwise */
  public boolean isSetRepetition_type() {
    return this.repetition_type != null;
  }

  public void setRepetition_typeIsSet(boolean value) {
    if (!value) {
      this.repetition_type = null;
    }
  }

  /**
   * Name of the field in the schema
   */
  public String getName() {
    return this.name;
  }

  /**
   * Name of the field in the schema
   */
  public SchemaElement setName(String name) {
    this.name = name;
    return this;
  }

  public void unsetName() {
    this.name = null;
  }

  /** Returns true if field name is set (has been assigned a value) and false otherwise */
  public boolean isSetName() {
    return this.name != null;
  }

  public void setNameIsSet(boolean value) {
    if (!value) {
      this.name = null;
    }
  }

  /**
   * Nested fields.  Since thrift does not support nested fields,
   * the nesting is flattened to a single list by a depth-first traversal.
   * The children count is used to construct the nested relationship.
   * This field is not set when the element is a primitive type
   */
  public int getNum_children() {
    return this.num_children;
  }

  /**
   * Nested fields.  Since thrift does not support nested fields,
   * the nesting is flattened to a single list by a depth-first traversal.
   * The children count is used to construct the nested relationship.
   * This field is not set when the element is a primitive type
   */
  public SchemaElement setNum_children(int num_children) {
    this.num_children = num_children;
    setNum_childrenIsSet(true);
    return this;
  }

  public void unsetNum_children() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_CHILDREN_ISSET_ID);
  }

  /** Returns true if field num_children is set (has been assigned a value) and false otherwise */
  public boolean isSetNum_children() {
    return EncodingUtils.testBit(__isset_bitfield, __NUM_CHILDREN_ISSET_ID);
  }

  public void setNum_childrenIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_CHILDREN_ISSET_ID, value);
  }

  /**
   * When the schema is the result of a conversion from another model
   * Used to record the original type to help with cross conversion.
   * 
   * @see ConvertedType
   */
  public ConvertedType getConverted_type() {
    return this.converted_type;
  }

  /**
   * When the schema is the result of a conversion from another model
   * Used to record the original type to help with cross conversion.
   * 
   * @see ConvertedType
   */
  public SchemaElement setConverted_type(ConvertedType converted_type) {
    this.converted_type = converted_type;
    return this;
  }

  public void unsetConverted_type() {
    this.converted_type = null;
  }

  /** Returns true if field converted_type is set (has been assigned a value) and false otherwise */
  public boolean isSetConverted_type() {
    return this.converted_type != null;
  }

  public void setConverted_typeIsSet(boolean value) {
    if (!value) {
      this.converted_type = null;
    }
  }

  /**
   * Used when this column contains decimal data.
   * See the DECIMAL converted type for more details.
   */
  public int getScale() {
    return this.scale;
  }

  /**
   * Used when this column contains decimal data.
   * See the DECIMAL converted type for more details.
   */
  public SchemaElement setScale(int scale) {
    this.scale = scale;
    setScaleIsSet(true);
    return this;
  }

  public void unsetScale() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCALE_ISSET_ID);
  }

  /** Returns true if field scale is set (has been assigned a value) and false otherwise */
  public boolean isSetScale() {
    return EncodingUtils.testBit(__isset_bitfield, __SCALE_ISSET_ID);
  }

  public void setScaleIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCALE_ISSET_ID, value);
  }

  public int getPrecision() {
    return this.precision;
  }

  public SchemaElement setPrecision(int precision) {
    this.precision = precision;
    setPrecisionIsSet(true);
    return this;
  }

  public void unsetPrecision() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PRECISION_ISSET_ID);
  }

  /** Returns true if field precision is set (has been assigned a value) and false otherwise */
  public boolean isSetPrecision() {
    return EncodingUtils.testBit(__isset_bitfield, __PRECISION_ISSET_ID);
  }

  public void setPrecisionIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PRECISION_ISSET_ID, value);
  }

  /**
   * When the original schema supports field ids, this will save the
   * original field id in the parquet schema
   */
  public int getField_id() {
    return this.field_id;
  }

  /**
   * When the original schema supports field ids, this will save the
   * original field id in the parquet schema
   */
  public SchemaElement setField_id(int field_id) {
    this.field_id = field_id;
    setField_idIsSet(true);
    return this;
  }

  public void unsetField_id() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FIELD_ID_ISSET_ID);
  }

  /** Returns true if field field_id is set (has been assigned a value) and false otherwise */
  public boolean isSetField_id() {
    return EncodingUtils.testBit(__isset_bitfield, __FIELD_ID_ISSET_ID);
  }

  public void setField_idIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FIELD_ID_ISSET_ID, value);
  }

  /**
   * The logical type of this SchemaElement; only valid for primitives.
   * 
   * LogicalType replaces ConvertedType, but ConvertedType is still required
   * for some logical types to ensure forward-compatibility in format v1.
   */
  public LogicalType getLogicalType() {
    return this.logicalType;
  }

  /**
   * The logical type of this SchemaElement; only valid for primitives.
   * 
   * LogicalType replaces ConvertedType, but ConvertedType is still required
   * for some logical types to ensure forward-compatibility in format v1.
   */
  public SchemaElement setLogicalType(LogicalType logicalType) {
    this.logicalType = logicalType;
    return this;
  }

  public void unsetLogicalType() {
    this.logicalType = null;
  }

  /** Returns true if field logicalType is set (has been assigned a value) and false otherwise */
  public boolean isSetLogicalType() {
    return this.logicalType != null;
  }

  public void setLogicalTypeIsSet(boolean value) {
    if (!value) {
      this.logicalType = null;
    }
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case TYPE:
      if (value == null) {
        unsetType();
      } else {
        setType((Type)value);
      }
      break;

    case TYPE_LENGTH:
      if (value == null) {
        unsetType_length();
      } else {
        setType_length((Integer)value);
      }
      break;

    case REPETITION_TYPE:
      if (value == null) {
        unsetRepetition_type();
      } else {
        setRepetition_type((FieldRepetitionType)value);
      }
      break;

    case NAME:
      if (value == null) {
        unsetName();
      } else {
        setName((String)value);
      }
      break;

    case NUM_CHILDREN:
      if (value == null) {
        unsetNum_children();
      } else {
        setNum_children((Integer)value);
      }
      break;

    case CONVERTED_TYPE:
      if (value == null) {
        unsetConverted_type();
      } else {
        setConverted_type((ConvertedType)value);
      }
      break;

    case SCALE:
      if (value == null) {
        unsetScale();
      } else {
        setScale((Integer)value);
      }
      break;

    case PRECISION:
      if (value == null) {
        unsetPrecision();
      } else {
        setPrecision((Integer)value);
      }
      break;

    case FIELD_ID:
      if (value == null) {
        unsetField_id();
      } else {
        setField_id((Integer)value);
      }
      break;

    case LOGICAL_TYPE:
      if (value == null) {
        unsetLogicalType();
      } else {
        setLogicalType((LogicalType)value);
      }
      break;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case TYPE:
      return getType();

    case TYPE_LENGTH:
      return getType_length();

    case REPETITION_TYPE:
      return getRepetition_type();

    case NAME:
      return getName();

    case NUM_CHILDREN:
      return getNum_children();

    case CONVERTED_TYPE:
      return getConverted_type();

    case SCALE:
      return getScale();

    case PRECISION:
      return getPrecision();

    case FIELD_ID:
      return getField_id();

    case LOGICAL_TYPE:
      return getLogicalType();

    }
    throw new IllegalStateException();
  }

  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case TYPE:
      return isSetType();
    case TYPE_LENGTH:
      return isSetType_length();
    case REPETITION_TYPE:
      return isSetRepetition_type();
    case NAME:
      return isSetName();
    case NUM_CHILDREN:
      return isSetNum_children();
    case CONVERTED_TYPE:
      return isSetConverted_type();
    case SCALE:
      return isSetScale();
    case PRECISION:
      return isSetPrecision();
    case FIELD_ID:
      return isSetField_id();
    case LOGICAL_TYPE:
      return isSetLogicalType();
    }
    throw new IllegalStateException();
  }

  @Override
  public boolean equals(Object that) {
    if (that == null)
      return false;
    if (that instanceof SchemaElement)
      return this.equals((SchemaElement)that);
    return false;
  }

  public boolean equals(SchemaElement that) {
    if (that == null)
      return false;

    boolean this_present_type = true && this.isSetType();
    boolean that_present_type = true && that.isSetType();
    if (this_present_type || that_present_type) {
      if (!(this_present_type && that_present_type))
        return false;
      if (!this.type.equals(that.type))
        return false;
    }

    boolean this_present_type_length = true && this.isSetType_length();
    boolean that_present_type_length = true && that.isSetType_length();
    if (this_present_type_length || that_present_type_length) {
      if (!(this_present_type_length && that_present_type_length))
        return false;
      if (this.type_length != that.type_length)
        return false;
    }

    boolean this_present_repetition_type = true && this.isSetRepetition_type();
    boolean that_present_repetition_type = true && that.isSetRepetition_type();
    if (this_present_repetition_type || that_present_repetition_type) {
      if (!(this_present_repetition_type && that_present_repetition_type))
        return false;
      if (!this.repetition_type.equals(that.repetition_type))
        return false;
    }

    boolean this_present_name = true && this.isSetName();
    boolean that_present_name = true && that.isSetName();
    if (this_present_name || that_present_name) {
      if (!(this_present_name && that_present_name))
        return false;
      if (!this.name.equals(that.name))
        return false;
    }

    boolean this_present_num_children = true && this.isSetNum_children();
    boolean that_present_num_children = true && that.isSetNum_children();
    if (this_present_num_children || that_present_num_children) {
      if (!(this_present_num_children && that_present_num_children))
        return false;
      if (this.num_children != that.num_children)
        return false;
    }

    boolean this_present_converted_type = true && this.isSetConverted_type();
    boolean that_present_converted_type = true && that.isSetConverted_type();
    if (this_present_converted_type || that_present_converted_type) {
      if (!(this_present_converted_type && that_present_converted_type))
        return false;
      if (!this.converted_type.equals(that.converted_type))
        return false;
    }

    boolean this_present_scale = true && this.isSetScale();
    boolean that_present_scale = true && that.isSetScale();
    if (this_present_scale || that_present_scale) {
      if (!(this_present_scale && that_present_scale))
        return false;
      if (this.scale != that.scale)
        return false;
    }

    boolean this_present_precision = true && this.isSetPrecision();
    boolean that_present_precision = true && that.isSetPrecision();
    if (this_present_precision || that_present_precision) {
      if (!(this_present_precision && that_present_precision))
        return false;
      if (this.precision != that.precision)
        return false;
    }

    boolean this_present_field_id = true && this.isSetField_id();
    boolean that_present_field_id = true && that.isSetField_id();
    if (this_present_field_id || that_present_field_id) {
      if (!(this_present_field_id && that_present_field_id))
        return false;
      if (this.field_id != that.field_id)
        return false;
    }

    boolean this_present_logicalType = true && this.isSetLogicalType();
    boolean that_present_logicalType = true && that.isSetLogicalType();
    if (this_present_logicalType || that_present_logicalType) {
      if (!(this_present_logicalType && that_present_logicalType))
        return false;
      if (!this.logicalType.equals(that.logicalType))
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    List list = new ArrayList();

    boolean present_type = true && (isSetType());
    list.add(present_type);
    if (present_type)
      list.add(type.getValue());

    boolean present_type_length = true && (isSetType_length());
    list.add(present_type_length);
    if (present_type_length)
      list.add(type_length);

    boolean present_repetition_type = true && (isSetRepetition_type());
    list.add(present_repetition_type);
    if (present_repetition_type)
      list.add(repetition_type.getValue());

    boolean present_name = true && (isSetName());
    list.add(present_name);
    if (present_name)
      list.add(name);

    boolean present_num_children = true && (isSetNum_children());
    list.add(present_num_children);
    if (present_num_children)
      list.add(num_children);

    boolean present_converted_type = true && (isSetConverted_type());
    list.add(present_converted_type);
    if (present_converted_type)
      list.add(converted_type.getValue());

    boolean present_scale = true && (isSetScale());
    list.add(present_scale);
    if (present_scale)
      list.add(scale);

    boolean present_precision = true && (isSetPrecision());
    list.add(present_precision);
    if (present_precision)
      list.add(precision);

    boolean present_field_id = true && (isSetField_id());
    list.add(present_field_id);
    if (present_field_id)
      list.add(field_id);

    boolean present_logicalType = true && (isSetLogicalType());
    list.add(present_logicalType);
    if (present_logicalType)
      list.add(logicalType);

    return list.hashCode();
  }

  @Override
  public int compareTo(SchemaElement other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetType()).compareTo(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 = Boolean.valueOf(isSetType_length()).compareTo(other.isSetType_length());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetType_length()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type_length, other.type_length);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetRepetition_type()).compareTo(other.isSetRepetition_type());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRepetition_type()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.repetition_type, other.repetition_type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetNum_children()).compareTo(other.isSetNum_children());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNum_children()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_children, other.num_children);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetConverted_type()).compareTo(other.isSetConverted_type());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetConverted_type()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.converted_type, other.converted_type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetScale()).compareTo(other.isSetScale());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetScale()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scale, other.scale);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPrecision()).compareTo(other.isSetPrecision());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPrecision()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.precision, other.precision);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetField_id()).compareTo(other.isSetField_id());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetField_id()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.field_id, other.field_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetLogicalType()).compareTo(other.isSetLogicalType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLogicalType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logicalType, other.logicalType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder("SchemaElement(");
    boolean first = true;

    if (isSetType()) {
      sb.append("type:");
      if (this.type == null) {
        sb.append("null");
      } else {
        sb.append(this.type);
      }
      first = false;
    }
    if (isSetType_length()) {
      if (!first) sb.append(", ");
      sb.append("type_length:");
      sb.append(this.type_length);
      first = false;
    }
    if (isSetRepetition_type()) {
      if (!first) sb.append(", ");
      sb.append("repetition_type:");
      if (this.repetition_type == null) {
        sb.append("null");
      } else {
        sb.append(this.repetition_type);
      }
      first = false;
    }
    if (!first) sb.append(", ");
    sb.append("name:");
    if (this.name == null) {
      sb.append("null");
    } else {
      sb.append(this.name);
    }
    first = false;
    if (isSetNum_children()) {
      if (!first) sb.append(", ");
      sb.append("num_children:");
      sb.append(this.num_children);
      first = false;
    }
    if (isSetConverted_type()) {
      if (!first) sb.append(", ");
      sb.append("converted_type:");
      if (this.converted_type == null) {
        sb.append("null");
      } else {
        sb.append(this.converted_type);
      }
      first = false;
    }
    if (isSetScale()) {
      if (!first) sb.append(", ");
      sb.append("scale:");
      sb.append(this.scale);
      first = false;
    }
    if (isSetPrecision()) {
      if (!first) sb.append(", ");
      sb.append("precision:");
      sb.append(this.precision);
      first = false;
    }
    if (isSetField_id()) {
      if (!first) sb.append(", ");
      sb.append("field_id:");
      sb.append(this.field_id);
      first = false;
    }
    if (isSetLogicalType()) {
      if (!first) sb.append(", ");
      sb.append("logicalType:");
      if (this.logicalType == null) {
        sb.append("null");
      } else {
        sb.append(this.logicalType);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    if (name == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' 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, 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 SchemaElementStandardSchemeFactory implements SchemeFactory {
    public SchemaElementStandardScheme getScheme() {
      return new SchemaElementStandardScheme();
    }
  }

  private static class SchemaElementStandardScheme extends StandardScheme {

    public void read(org.apache.thrift.protocol.TProtocol iprot, SchemaElement 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: // TYPE_LENGTH
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.type_length = iprot.readI32();
              struct.setType_lengthIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // REPETITION_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.repetition_type = org.apache.parquet.format.FieldRepetitionType.findByValue(iprot.readI32());
              struct.setRepetition_typeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.name = iprot.readString();
              struct.setNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // NUM_CHILDREN
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.num_children = iprot.readI32();
              struct.setNum_childrenIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // CONVERTED_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.converted_type = org.apache.parquet.format.ConvertedType.findByValue(iprot.readI32());
              struct.setConverted_typeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // SCALE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.scale = iprot.readI32();
              struct.setScaleIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // PRECISION
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.precision = iprot.readI32();
              struct.setPrecisionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // FIELD_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.field_id = iprot.readI32();
              struct.setField_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // LOGICAL_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.logicalType = new LogicalType();
              struct.logicalType.read(iprot);
              struct.setLogicalTypeIsSet(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, SchemaElement struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.type != null) {
        if (struct.isSetType()) {
          oprot.writeFieldBegin(TYPE_FIELD_DESC);
          oprot.writeI32(struct.type.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetType_length()) {
        oprot.writeFieldBegin(TYPE_LENGTH_FIELD_DESC);
        oprot.writeI32(struct.type_length);
        oprot.writeFieldEnd();
      }
      if (struct.repetition_type != null) {
        if (struct.isSetRepetition_type()) {
          oprot.writeFieldBegin(REPETITION_TYPE_FIELD_DESC);
          oprot.writeI32(struct.repetition_type.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.name != null) {
        oprot.writeFieldBegin(NAME_FIELD_DESC);
        oprot.writeString(struct.name);
        oprot.writeFieldEnd();
      }
      if (struct.isSetNum_children()) {
        oprot.writeFieldBegin(NUM_CHILDREN_FIELD_DESC);
        oprot.writeI32(struct.num_children);
        oprot.writeFieldEnd();
      }
      if (struct.converted_type != null) {
        if (struct.isSetConverted_type()) {
          oprot.writeFieldBegin(CONVERTED_TYPE_FIELD_DESC);
          oprot.writeI32(struct.converted_type.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetScale()) {
        oprot.writeFieldBegin(SCALE_FIELD_DESC);
        oprot.writeI32(struct.scale);
        oprot.writeFieldEnd();
      }
      if (struct.isSetPrecision()) {
        oprot.writeFieldBegin(PRECISION_FIELD_DESC);
        oprot.writeI32(struct.precision);
        oprot.writeFieldEnd();
      }
      if (struct.isSetField_id()) {
        oprot.writeFieldBegin(FIELD_ID_FIELD_DESC);
        oprot.writeI32(struct.field_id);
        oprot.writeFieldEnd();
      }
      if (struct.logicalType != null) {
        if (struct.isSetLogicalType()) {
          oprot.writeFieldBegin(LOGICAL_TYPE_FIELD_DESC);
          struct.logicalType.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class SchemaElementTupleSchemeFactory implements SchemeFactory {
    public SchemaElementTupleScheme getScheme() {
      return new SchemaElementTupleScheme();
    }
  }

  private static class SchemaElementTupleScheme extends TupleScheme {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, SchemaElement struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      oprot.writeString(struct.name);
      BitSet optionals = new BitSet();
      if (struct.isSetType()) {
        optionals.set(0);
      }
      if (struct.isSetType_length()) {
        optionals.set(1);
      }
      if (struct.isSetRepetition_type()) {
        optionals.set(2);
      }
      if (struct.isSetNum_children()) {
        optionals.set(3);
      }
      if (struct.isSetConverted_type()) {
        optionals.set(4);
      }
      if (struct.isSetScale()) {
        optionals.set(5);
      }
      if (struct.isSetPrecision()) {
        optionals.set(6);
      }
      if (struct.isSetField_id()) {
        optionals.set(7);
      }
      if (struct.isSetLogicalType()) {
        optionals.set(8);
      }
      oprot.writeBitSet(optionals, 9);
      if (struct.isSetType()) {
        oprot.writeI32(struct.type.getValue());
      }
      if (struct.isSetType_length()) {
        oprot.writeI32(struct.type_length);
      }
      if (struct.isSetRepetition_type()) {
        oprot.writeI32(struct.repetition_type.getValue());
      }
      if (struct.isSetNum_children()) {
        oprot.writeI32(struct.num_children);
      }
      if (struct.isSetConverted_type()) {
        oprot.writeI32(struct.converted_type.getValue());
      }
      if (struct.isSetScale()) {
        oprot.writeI32(struct.scale);
      }
      if (struct.isSetPrecision()) {
        oprot.writeI32(struct.precision);
      }
      if (struct.isSetField_id()) {
        oprot.writeI32(struct.field_id);
      }
      if (struct.isSetLogicalType()) {
        struct.logicalType.write(oprot);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, SchemaElement struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      struct.name = iprot.readString();
      struct.setNameIsSet(true);
      BitSet incoming = iprot.readBitSet(9);
      if (incoming.get(0)) {
        struct.type = org.apache.parquet.format.Type.findByValue(iprot.readI32());
        struct.setTypeIsSet(true);
      }
      if (incoming.get(1)) {
        struct.type_length = iprot.readI32();
        struct.setType_lengthIsSet(true);
      }
      if (incoming.get(2)) {
        struct.repetition_type = org.apache.parquet.format.FieldRepetitionType.findByValue(iprot.readI32());
        struct.setRepetition_typeIsSet(true);
      }
      if (incoming.get(3)) {
        struct.num_children = iprot.readI32();
        struct.setNum_childrenIsSet(true);
      }
      if (incoming.get(4)) {
        struct.converted_type = org.apache.parquet.format.ConvertedType.findByValue(iprot.readI32());
        struct.setConverted_typeIsSet(true);
      }
      if (incoming.get(5)) {
        struct.scale = iprot.readI32();
        struct.setScaleIsSet(true);
      }
      if (incoming.get(6)) {
        struct.precision = iprot.readI32();
        struct.setPrecisionIsSet(true);
      }
      if (incoming.get(7)) {
        struct.field_id = iprot.readI32();
        struct.setField_idIsSet(true);
      }
      if (incoming.get(8)) {
        struct.logicalType = new LogicalType();
        struct.logicalType.read(iprot);
        struct.setLogicalTypeIsSet(true);
      }
    }
  }

}