TSlotDescriptor.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.doris.thrift;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)", date = "2026-05-14")
public class TSlotDescriptor implements org.apache.thrift.TBase<TSlotDescriptor, TSlotDescriptor._Fields>, java.io.Serializable, Cloneable, Comparable<TSlotDescriptor> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSlotDescriptor");

  private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I32, (short)1);
  private static final org.apache.thrift.protocol.TField PARENT_FIELD_DESC = new org.apache.thrift.protocol.TField("parent", org.apache.thrift.protocol.TType.I32, (short)2);
  private static final org.apache.thrift.protocol.TField SLOT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("slotType", org.apache.thrift.protocol.TType.STRUCT, (short)3);
  private static final org.apache.thrift.protocol.TField COLUMN_POS_FIELD_DESC = new org.apache.thrift.protocol.TField("columnPos", org.apache.thrift.protocol.TType.I32, (short)4);
  private static final org.apache.thrift.protocol.TField BYTE_OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("byteOffset", org.apache.thrift.protocol.TType.I32, (short)5);
  private static final org.apache.thrift.protocol.TField NULL_INDICATOR_BYTE_FIELD_DESC = new org.apache.thrift.protocol.TField("nullIndicatorByte", org.apache.thrift.protocol.TType.I32, (short)6);
  private static final org.apache.thrift.protocol.TField NULL_INDICATOR_BIT_FIELD_DESC = new org.apache.thrift.protocol.TField("nullIndicatorBit", org.apache.thrift.protocol.TType.I32, (short)7);
  private static final org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("colName", org.apache.thrift.protocol.TType.STRING, (short)8);
  private static final org.apache.thrift.protocol.TField SLOT_IDX_FIELD_DESC = new org.apache.thrift.protocol.TField("slotIdx", org.apache.thrift.protocol.TType.I32, (short)9);
  private static final org.apache.thrift.protocol.TField IS_MATERIALIZED_FIELD_DESC = new org.apache.thrift.protocol.TField("isMaterialized", org.apache.thrift.protocol.TType.BOOL, (short)10);
  private static final org.apache.thrift.protocol.TField COL_UNIQUE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("col_unique_id", org.apache.thrift.protocol.TType.I32, (short)11);
  private static final org.apache.thrift.protocol.TField IS_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("is_key", org.apache.thrift.protocol.TType.BOOL, (short)12);
  private static final org.apache.thrift.protocol.TField NEED_MATERIALIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("need_materialize", org.apache.thrift.protocol.TType.BOOL, (short)13);
  private static final org.apache.thrift.protocol.TField IS_AUTO_INCREMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("is_auto_increment", org.apache.thrift.protocol.TType.BOOL, (short)14);
  private static final org.apache.thrift.protocol.TField COLUMN_PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("column_paths", org.apache.thrift.protocol.TType.LIST, (short)15);
  private static final org.apache.thrift.protocol.TField COL_DEFAULT_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("col_default_value", org.apache.thrift.protocol.TType.STRING, (short)16);
  private static final org.apache.thrift.protocol.TField PRIMITIVE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("primitive_type", org.apache.thrift.protocol.TType.I32, (short)17);
  private static final org.apache.thrift.protocol.TField VIRTUAL_COLUMN_EXPR_FIELD_DESC = new org.apache.thrift.protocol.TField("virtual_column_expr", org.apache.thrift.protocol.TType.STRUCT, (short)18);
  private static final org.apache.thrift.protocol.TField ALL_ACCESS_PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("all_access_paths", org.apache.thrift.protocol.TType.LIST, (short)19);
  private static final org.apache.thrift.protocol.TField PREDICATE_ACCESS_PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("predicate_access_paths", org.apache.thrift.protocol.TType.LIST, (short)20);

  private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSlotDescriptorStandardSchemeFactory();
  private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSlotDescriptorTupleSchemeFactory();

  public int id; // required
  public int parent; // required
  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TTypeDesc slotType; // required
  public int columnPos; // required
  public int byteOffset; // required
  public int nullIndicatorByte; // required
  public int nullIndicatorBit; // required
  public @org.apache.thrift.annotation.Nullable java.lang.String colName; // required
  public int slotIdx; // required
  public boolean isMaterialized; // required
  public int col_unique_id; // optional
  public boolean is_key; // optional
  public boolean need_materialize; // optional
  public boolean is_auto_increment; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> column_paths; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String col_default_value; // optional
  /**
   * 
   * @see org.apache.doris.thrift.TPrimitiveType
   */
  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TPrimitiveType primitive_type; // optional
  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr virtual_column_expr; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<TColumnAccessPath> all_access_paths; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<TColumnAccessPath> predicate_access_paths; // 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 {
    ID((short)1, "id"),
    PARENT((short)2, "parent"),
    SLOT_TYPE((short)3, "slotType"),
    COLUMN_POS((short)4, "columnPos"),
    BYTE_OFFSET((short)5, "byteOffset"),
    NULL_INDICATOR_BYTE((short)6, "nullIndicatorByte"),
    NULL_INDICATOR_BIT((short)7, "nullIndicatorBit"),
    COL_NAME((short)8, "colName"),
    SLOT_IDX((short)9, "slotIdx"),
    IS_MATERIALIZED((short)10, "isMaterialized"),
    COL_UNIQUE_ID((short)11, "col_unique_id"),
    IS_KEY((short)12, "is_key"),
    NEED_MATERIALIZE((short)13, "need_materialize"),
    IS_AUTO_INCREMENT((short)14, "is_auto_increment"),
    COLUMN_PATHS((short)15, "column_paths"),
    COL_DEFAULT_VALUE((short)16, "col_default_value"),
    /**
     * 
     * @see org.apache.doris.thrift.TPrimitiveType
     */
    PRIMITIVE_TYPE((short)17, "primitive_type"),
    VIRTUAL_COLUMN_EXPR((short)18, "virtual_column_expr"),
    ALL_ACCESS_PATHS((short)19, "all_access_paths"),
    PREDICATE_ACCESS_PATHS((short)20, "predicate_access_paths");

    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: // ID
          return ID;
        case 2: // PARENT
          return PARENT;
        case 3: // SLOT_TYPE
          return SLOT_TYPE;
        case 4: // COLUMN_POS
          return COLUMN_POS;
        case 5: // BYTE_OFFSET
          return BYTE_OFFSET;
        case 6: // NULL_INDICATOR_BYTE
          return NULL_INDICATOR_BYTE;
        case 7: // NULL_INDICATOR_BIT
          return NULL_INDICATOR_BIT;
        case 8: // COL_NAME
          return COL_NAME;
        case 9: // SLOT_IDX
          return SLOT_IDX;
        case 10: // IS_MATERIALIZED
          return IS_MATERIALIZED;
        case 11: // COL_UNIQUE_ID
          return COL_UNIQUE_ID;
        case 12: // IS_KEY
          return IS_KEY;
        case 13: // NEED_MATERIALIZE
          return NEED_MATERIALIZE;
        case 14: // IS_AUTO_INCREMENT
          return IS_AUTO_INCREMENT;
        case 15: // COLUMN_PATHS
          return COLUMN_PATHS;
        case 16: // COL_DEFAULT_VALUE
          return COL_DEFAULT_VALUE;
        case 17: // PRIMITIVE_TYPE
          return PRIMITIVE_TYPE;
        case 18: // VIRTUAL_COLUMN_EXPR
          return VIRTUAL_COLUMN_EXPR;
        case 19: // ALL_ACCESS_PATHS
          return ALL_ACCESS_PATHS;
        case 20: // PREDICATE_ACCESS_PATHS
          return PREDICATE_ACCESS_PATHS;
        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 __ID_ISSET_ID = 0;
  private static final int __PARENT_ISSET_ID = 1;
  private static final int __COLUMNPOS_ISSET_ID = 2;
  private static final int __BYTEOFFSET_ISSET_ID = 3;
  private static final int __NULLINDICATORBYTE_ISSET_ID = 4;
  private static final int __NULLINDICATORBIT_ISSET_ID = 5;
  private static final int __SLOTIDX_ISSET_ID = 6;
  private static final int __ISMATERIALIZED_ISSET_ID = 7;
  private static final int __COL_UNIQUE_ID_ISSET_ID = 8;
  private static final int __IS_KEY_ISSET_ID = 9;
  private static final int __NEED_MATERIALIZE_ISSET_ID = 10;
  private static final int __IS_AUTO_INCREMENT_ISSET_ID = 11;
  private short __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.COL_UNIQUE_ID,_Fields.IS_KEY,_Fields.NEED_MATERIALIZE,_Fields.IS_AUTO_INCREMENT,_Fields.COLUMN_PATHS,_Fields.COL_DEFAULT_VALUE,_Fields.PRIMITIVE_TYPE,_Fields.VIRTUAL_COLUMN_EXPR,_Fields.ALL_ACCESS_PATHS,_Fields.PREDICATE_ACCESS_PATHS};
  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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32        , "TSlotId")));
    tmpMap.put(_Fields.PARENT, new org.apache.thrift.meta_data.FieldMetaData("parent", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32        , "TTupleId")));
    tmpMap.put(_Fields.SLOT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("slotType", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TTypeDesc.class)));
    tmpMap.put(_Fields.COLUMN_POS, new org.apache.thrift.meta_data.FieldMetaData("columnPos", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.BYTE_OFFSET, new org.apache.thrift.meta_data.FieldMetaData("byteOffset", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.NULL_INDICATOR_BYTE, new org.apache.thrift.meta_data.FieldMetaData("nullIndicatorByte", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.NULL_INDICATOR_BIT, new org.apache.thrift.meta_data.FieldMetaData("nullIndicatorBit", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("colName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.SLOT_IDX, new org.apache.thrift.meta_data.FieldMetaData("slotIdx", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.IS_MATERIALIZED, new org.apache.thrift.meta_data.FieldMetaData("isMaterialized", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.COL_UNIQUE_ID, new org.apache.thrift.meta_data.FieldMetaData("col_unique_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.IS_KEY, new org.apache.thrift.meta_data.FieldMetaData("is_key", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.NEED_MATERIALIZE, new org.apache.thrift.meta_data.FieldMetaData("need_materialize", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.IS_AUTO_INCREMENT, new org.apache.thrift.meta_data.FieldMetaData("is_auto_increment", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.COLUMN_PATHS, new org.apache.thrift.meta_data.FieldMetaData("column_paths", 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.STRING))));
    tmpMap.put(_Fields.COL_DEFAULT_VALUE, new org.apache.thrift.meta_data.FieldMetaData("col_default_value", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.PRIMITIVE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("primitive_type", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.doris.thrift.TPrimitiveType.class)));
    tmpMap.put(_Fields.VIRTUAL_COLUMN_EXPR, new org.apache.thrift.meta_data.FieldMetaData("virtual_column_expr", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TExpr.class)));
    tmpMap.put(_Fields.ALL_ACCESS_PATHS, new org.apache.thrift.meta_data.FieldMetaData("all_access_paths", 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, TColumnAccessPath.class))));
    tmpMap.put(_Fields.PREDICATE_ACCESS_PATHS, new org.apache.thrift.meta_data.FieldMetaData("predicate_access_paths", 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, TColumnAccessPath.class))));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSlotDescriptor.class, metaDataMap);
  }

  public TSlotDescriptor() {
    this.col_unique_id = -1;

    this.is_key = false;

    this.need_materialize = true;

    this.is_auto_increment = false;

    this.primitive_type = org.apache.doris.thrift.TPrimitiveType.INVALID_TYPE;

  }

  public TSlotDescriptor(
    int id,
    int parent,
    org.apache.doris.thrift.TTypeDesc slotType,
    int columnPos,
    int byteOffset,
    int nullIndicatorByte,
    int nullIndicatorBit,
    java.lang.String colName,
    int slotIdx,
    boolean isMaterialized)
  {
    this();
    this.id = id;
    setIdIsSet(true);
    this.parent = parent;
    setParentIsSet(true);
    this.slotType = slotType;
    this.columnPos = columnPos;
    setColumnPosIsSet(true);
    this.byteOffset = byteOffset;
    setByteOffsetIsSet(true);
    this.nullIndicatorByte = nullIndicatorByte;
    setNullIndicatorByteIsSet(true);
    this.nullIndicatorBit = nullIndicatorBit;
    setNullIndicatorBitIsSet(true);
    this.colName = colName;
    this.slotIdx = slotIdx;
    setSlotIdxIsSet(true);
    this.isMaterialized = isMaterialized;
    setIsMaterializedIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TSlotDescriptor(TSlotDescriptor other) {
    __isset_bitfield = other.__isset_bitfield;
    this.id = other.id;
    this.parent = other.parent;
    if (other.isSetSlotType()) {
      this.slotType = new org.apache.doris.thrift.TTypeDesc(other.slotType);
    }
    this.columnPos = other.columnPos;
    this.byteOffset = other.byteOffset;
    this.nullIndicatorByte = other.nullIndicatorByte;
    this.nullIndicatorBit = other.nullIndicatorBit;
    if (other.isSetColName()) {
      this.colName = other.colName;
    }
    this.slotIdx = other.slotIdx;
    this.isMaterialized = other.isMaterialized;
    this.col_unique_id = other.col_unique_id;
    this.is_key = other.is_key;
    this.need_materialize = other.need_materialize;
    this.is_auto_increment = other.is_auto_increment;
    if (other.isSetColumnPaths()) {
      java.util.List<java.lang.String> __this__column_paths = new java.util.ArrayList<java.lang.String>(other.column_paths);
      this.column_paths = __this__column_paths;
    }
    if (other.isSetColDefaultValue()) {
      this.col_default_value = other.col_default_value;
    }
    if (other.isSetPrimitiveType()) {
      this.primitive_type = other.primitive_type;
    }
    if (other.isSetVirtualColumnExpr()) {
      this.virtual_column_expr = new org.apache.doris.thrift.TExpr(other.virtual_column_expr);
    }
    if (other.isSetAllAccessPaths()) {
      java.util.List<TColumnAccessPath> __this__all_access_paths = new java.util.ArrayList<TColumnAccessPath>(other.all_access_paths.size());
      for (TColumnAccessPath other_element : other.all_access_paths) {
        __this__all_access_paths.add(new TColumnAccessPath(other_element));
      }
      this.all_access_paths = __this__all_access_paths;
    }
    if (other.isSetPredicateAccessPaths()) {
      java.util.List<TColumnAccessPath> __this__predicate_access_paths = new java.util.ArrayList<TColumnAccessPath>(other.predicate_access_paths.size());
      for (TColumnAccessPath other_element : other.predicate_access_paths) {
        __this__predicate_access_paths.add(new TColumnAccessPath(other_element));
      }
      this.predicate_access_paths = __this__predicate_access_paths;
    }
  }

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

  @Override
  public void clear() {
    setIdIsSet(false);
    this.id = 0;
    setParentIsSet(false);
    this.parent = 0;
    this.slotType = null;
    setColumnPosIsSet(false);
    this.columnPos = 0;
    setByteOffsetIsSet(false);
    this.byteOffset = 0;
    setNullIndicatorByteIsSet(false);
    this.nullIndicatorByte = 0;
    setNullIndicatorBitIsSet(false);
    this.nullIndicatorBit = 0;
    this.colName = null;
    setSlotIdxIsSet(false);
    this.slotIdx = 0;
    setIsMaterializedIsSet(false);
    this.isMaterialized = false;
    this.col_unique_id = -1;

    this.is_key = false;

    this.need_materialize = true;

    this.is_auto_increment = false;

    this.column_paths = null;
    this.col_default_value = null;
    this.primitive_type = org.apache.doris.thrift.TPrimitiveType.INVALID_TYPE;

    this.virtual_column_expr = null;
    this.all_access_paths = null;
    this.predicate_access_paths = null;
  }

  public int getId() {
    return this.id;
  }

  public TSlotDescriptor setId(int id) {
    this.id = id;
    setIdIsSet(true);
    return this;
  }

  public void unsetId() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID);
  }

  /** Returns true if field id is set (has been assigned a value) and false otherwise */
  public boolean isSetId() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);
  }

  public void setIdIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value);
  }

  public int getParent() {
    return this.parent;
  }

  public TSlotDescriptor setParent(int parent) {
    this.parent = parent;
    setParentIsSet(true);
    return this;
  }

  public void unsetParent() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PARENT_ISSET_ID);
  }

  /** Returns true if field parent is set (has been assigned a value) and false otherwise */
  public boolean isSetParent() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARENT_ISSET_ID);
  }

  public void setParentIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PARENT_ISSET_ID, value);
  }

  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TTypeDesc getSlotType() {
    return this.slotType;
  }

  public TSlotDescriptor setSlotType(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TTypeDesc slotType) {
    this.slotType = slotType;
    return this;
  }

  public void unsetSlotType() {
    this.slotType = null;
  }

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

  public void setSlotTypeIsSet(boolean value) {
    if (!value) {
      this.slotType = null;
    }
  }

  public int getColumnPos() {
    return this.columnPos;
  }

  public TSlotDescriptor setColumnPos(int columnPos) {
    this.columnPos = columnPos;
    setColumnPosIsSet(true);
    return this;
  }

  public void unsetColumnPos() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNPOS_ISSET_ID);
  }

  /** Returns true if field columnPos is set (has been assigned a value) and false otherwise */
  public boolean isSetColumnPos() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNPOS_ISSET_ID);
  }

  public void setColumnPosIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNPOS_ISSET_ID, value);
  }

  public int getByteOffset() {
    return this.byteOffset;
  }

  public TSlotDescriptor setByteOffset(int byteOffset) {
    this.byteOffset = byteOffset;
    setByteOffsetIsSet(true);
    return this;
  }

  public void unsetByteOffset() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BYTEOFFSET_ISSET_ID);
  }

  /** Returns true if field byteOffset is set (has been assigned a value) and false otherwise */
  public boolean isSetByteOffset() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BYTEOFFSET_ISSET_ID);
  }

  public void setByteOffsetIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BYTEOFFSET_ISSET_ID, value);
  }

  public int getNullIndicatorByte() {
    return this.nullIndicatorByte;
  }

  public TSlotDescriptor setNullIndicatorByte(int nullIndicatorByte) {
    this.nullIndicatorByte = nullIndicatorByte;
    setNullIndicatorByteIsSet(true);
    return this;
  }

  public void unsetNullIndicatorByte() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NULLINDICATORBYTE_ISSET_ID);
  }

  /** Returns true if field nullIndicatorByte is set (has been assigned a value) and false otherwise */
  public boolean isSetNullIndicatorByte() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NULLINDICATORBYTE_ISSET_ID);
  }

  public void setNullIndicatorByteIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NULLINDICATORBYTE_ISSET_ID, value);
  }

  public int getNullIndicatorBit() {
    return this.nullIndicatorBit;
  }

  public TSlotDescriptor setNullIndicatorBit(int nullIndicatorBit) {
    this.nullIndicatorBit = nullIndicatorBit;
    setNullIndicatorBitIsSet(true);
    return this;
  }

  public void unsetNullIndicatorBit() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NULLINDICATORBIT_ISSET_ID);
  }

  /** Returns true if field nullIndicatorBit is set (has been assigned a value) and false otherwise */
  public boolean isSetNullIndicatorBit() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NULLINDICATORBIT_ISSET_ID);
  }

  public void setNullIndicatorBitIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NULLINDICATORBIT_ISSET_ID, value);
  }

  @org.apache.thrift.annotation.Nullable
  public java.lang.String getColName() {
    return this.colName;
  }

  public TSlotDescriptor setColName(@org.apache.thrift.annotation.Nullable java.lang.String colName) {
    this.colName = colName;
    return this;
  }

  public void unsetColName() {
    this.colName = null;
  }

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

  public void setColNameIsSet(boolean value) {
    if (!value) {
      this.colName = null;
    }
  }

  public int getSlotIdx() {
    return this.slotIdx;
  }

  public TSlotDescriptor setSlotIdx(int slotIdx) {
    this.slotIdx = slotIdx;
    setSlotIdxIsSet(true);
    return this;
  }

  public void unsetSlotIdx() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SLOTIDX_ISSET_ID);
  }

  /** Returns true if field slotIdx is set (has been assigned a value) and false otherwise */
  public boolean isSetSlotIdx() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SLOTIDX_ISSET_ID);
  }

  public void setSlotIdxIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SLOTIDX_ISSET_ID, value);
  }

  public boolean isIsMaterialized() {
    return this.isMaterialized;
  }

  public TSlotDescriptor setIsMaterialized(boolean isMaterialized) {
    this.isMaterialized = isMaterialized;
    setIsMaterializedIsSet(true);
    return this;
  }

  public void unsetIsMaterialized() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISMATERIALIZED_ISSET_ID);
  }

  /** Returns true if field isMaterialized is set (has been assigned a value) and false otherwise */
  public boolean isSetIsMaterialized() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISMATERIALIZED_ISSET_ID);
  }

  public void setIsMaterializedIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISMATERIALIZED_ISSET_ID, value);
  }

  public int getColUniqueId() {
    return this.col_unique_id;
  }

  public TSlotDescriptor setColUniqueId(int col_unique_id) {
    this.col_unique_id = col_unique_id;
    setColUniqueIdIsSet(true);
    return this;
  }

  public void unsetColUniqueId() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COL_UNIQUE_ID_ISSET_ID);
  }

  /** Returns true if field col_unique_id is set (has been assigned a value) and false otherwise */
  public boolean isSetColUniqueId() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COL_UNIQUE_ID_ISSET_ID);
  }

  public void setColUniqueIdIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COL_UNIQUE_ID_ISSET_ID, value);
  }

  public boolean isIsKey() {
    return this.is_key;
  }

  public TSlotDescriptor setIsKey(boolean is_key) {
    this.is_key = is_key;
    setIsKeyIsSet(true);
    return this;
  }

  public void unsetIsKey() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_KEY_ISSET_ID);
  }

  /** Returns true if field is_key is set (has been assigned a value) and false otherwise */
  public boolean isSetIsKey() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_KEY_ISSET_ID);
  }

  public void setIsKeyIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_KEY_ISSET_ID, value);
  }

  public boolean isNeedMaterialize() {
    return this.need_materialize;
  }

  public TSlotDescriptor setNeedMaterialize(boolean need_materialize) {
    this.need_materialize = need_materialize;
    setNeedMaterializeIsSet(true);
    return this;
  }

  public void unsetNeedMaterialize() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NEED_MATERIALIZE_ISSET_ID);
  }

  /** Returns true if field need_materialize is set (has been assigned a value) and false otherwise */
  public boolean isSetNeedMaterialize() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NEED_MATERIALIZE_ISSET_ID);
  }

  public void setNeedMaterializeIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NEED_MATERIALIZE_ISSET_ID, value);
  }

  public boolean isIsAutoIncrement() {
    return this.is_auto_increment;
  }

  public TSlotDescriptor setIsAutoIncrement(boolean is_auto_increment) {
    this.is_auto_increment = is_auto_increment;
    setIsAutoIncrementIsSet(true);
    return this;
  }

  public void unsetIsAutoIncrement() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_AUTO_INCREMENT_ISSET_ID);
  }

  /** Returns true if field is_auto_increment is set (has been assigned a value) and false otherwise */
  public boolean isSetIsAutoIncrement() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_AUTO_INCREMENT_ISSET_ID);
  }

  public void setIsAutoIncrementIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_AUTO_INCREMENT_ISSET_ID, value);
  }

  public int getColumnPathsSize() {
    return (this.column_paths == null) ? 0 : this.column_paths.size();
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<java.lang.String> getColumnPathsIterator() {
    return (this.column_paths == null) ? null : this.column_paths.iterator();
  }

  public void addToColumnPaths(java.lang.String elem) {
    if (this.column_paths == null) {
      this.column_paths = new java.util.ArrayList<java.lang.String>();
    }
    this.column_paths.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<java.lang.String> getColumnPaths() {
    return this.column_paths;
  }

  public TSlotDescriptor setColumnPaths(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> column_paths) {
    this.column_paths = column_paths;
    return this;
  }

  public void unsetColumnPaths() {
    this.column_paths = null;
  }

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

  public void setColumnPathsIsSet(boolean value) {
    if (!value) {
      this.column_paths = null;
    }
  }

  @org.apache.thrift.annotation.Nullable
  public java.lang.String getColDefaultValue() {
    return this.col_default_value;
  }

  public TSlotDescriptor setColDefaultValue(@org.apache.thrift.annotation.Nullable java.lang.String col_default_value) {
    this.col_default_value = col_default_value;
    return this;
  }

  public void unsetColDefaultValue() {
    this.col_default_value = null;
  }

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

  public void setColDefaultValueIsSet(boolean value) {
    if (!value) {
      this.col_default_value = null;
    }
  }

  /**
   * 
   * @see org.apache.doris.thrift.TPrimitiveType
   */
  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TPrimitiveType getPrimitiveType() {
    return this.primitive_type;
  }

  /**
   * 
   * @see org.apache.doris.thrift.TPrimitiveType
   */
  public TSlotDescriptor setPrimitiveType(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TPrimitiveType primitive_type) {
    this.primitive_type = primitive_type;
    return this;
  }

  public void unsetPrimitiveType() {
    this.primitive_type = null;
  }

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

  public void setPrimitiveTypeIsSet(boolean value) {
    if (!value) {
      this.primitive_type = null;
    }
  }

  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TExpr getVirtualColumnExpr() {
    return this.virtual_column_expr;
  }

  public TSlotDescriptor setVirtualColumnExpr(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr virtual_column_expr) {
    this.virtual_column_expr = virtual_column_expr;
    return this;
  }

  public void unsetVirtualColumnExpr() {
    this.virtual_column_expr = null;
  }

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

  public void setVirtualColumnExprIsSet(boolean value) {
    if (!value) {
      this.virtual_column_expr = null;
    }
  }

  public int getAllAccessPathsSize() {
    return (this.all_access_paths == null) ? 0 : this.all_access_paths.size();
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<TColumnAccessPath> getAllAccessPathsIterator() {
    return (this.all_access_paths == null) ? null : this.all_access_paths.iterator();
  }

  public void addToAllAccessPaths(TColumnAccessPath elem) {
    if (this.all_access_paths == null) {
      this.all_access_paths = new java.util.ArrayList<TColumnAccessPath>();
    }
    this.all_access_paths.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<TColumnAccessPath> getAllAccessPaths() {
    return this.all_access_paths;
  }

  public TSlotDescriptor setAllAccessPaths(@org.apache.thrift.annotation.Nullable java.util.List<TColumnAccessPath> all_access_paths) {
    this.all_access_paths = all_access_paths;
    return this;
  }

  public void unsetAllAccessPaths() {
    this.all_access_paths = null;
  }

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

  public void setAllAccessPathsIsSet(boolean value) {
    if (!value) {
      this.all_access_paths = null;
    }
  }

  public int getPredicateAccessPathsSize() {
    return (this.predicate_access_paths == null) ? 0 : this.predicate_access_paths.size();
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<TColumnAccessPath> getPredicateAccessPathsIterator() {
    return (this.predicate_access_paths == null) ? null : this.predicate_access_paths.iterator();
  }

  public void addToPredicateAccessPaths(TColumnAccessPath elem) {
    if (this.predicate_access_paths == null) {
      this.predicate_access_paths = new java.util.ArrayList<TColumnAccessPath>();
    }
    this.predicate_access_paths.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<TColumnAccessPath> getPredicateAccessPaths() {
    return this.predicate_access_paths;
  }

  public TSlotDescriptor setPredicateAccessPaths(@org.apache.thrift.annotation.Nullable java.util.List<TColumnAccessPath> predicate_access_paths) {
    this.predicate_access_paths = predicate_access_paths;
    return this;
  }

  public void unsetPredicateAccessPaths() {
    this.predicate_access_paths = null;
  }

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

  public void setPredicateAccessPathsIsSet(boolean value) {
    if (!value) {
      this.predicate_access_paths = null;
    }
  }

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case ID:
      if (value == null) {
        unsetId();
      } else {
        setId((java.lang.Integer)value);
      }
      break;

    case PARENT:
      if (value == null) {
        unsetParent();
      } else {
        setParent((java.lang.Integer)value);
      }
      break;

    case SLOT_TYPE:
      if (value == null) {
        unsetSlotType();
      } else {
        setSlotType((org.apache.doris.thrift.TTypeDesc)value);
      }
      break;

    case COLUMN_POS:
      if (value == null) {
        unsetColumnPos();
      } else {
        setColumnPos((java.lang.Integer)value);
      }
      break;

    case BYTE_OFFSET:
      if (value == null) {
        unsetByteOffset();
      } else {
        setByteOffset((java.lang.Integer)value);
      }
      break;

    case NULL_INDICATOR_BYTE:
      if (value == null) {
        unsetNullIndicatorByte();
      } else {
        setNullIndicatorByte((java.lang.Integer)value);
      }
      break;

    case NULL_INDICATOR_BIT:
      if (value == null) {
        unsetNullIndicatorBit();
      } else {
        setNullIndicatorBit((java.lang.Integer)value);
      }
      break;

    case COL_NAME:
      if (value == null) {
        unsetColName();
      } else {
        setColName((java.lang.String)value);
      }
      break;

    case SLOT_IDX:
      if (value == null) {
        unsetSlotIdx();
      } else {
        setSlotIdx((java.lang.Integer)value);
      }
      break;

    case IS_MATERIALIZED:
      if (value == null) {
        unsetIsMaterialized();
      } else {
        setIsMaterialized((java.lang.Boolean)value);
      }
      break;

    case COL_UNIQUE_ID:
      if (value == null) {
        unsetColUniqueId();
      } else {
        setColUniqueId((java.lang.Integer)value);
      }
      break;

    case IS_KEY:
      if (value == null) {
        unsetIsKey();
      } else {
        setIsKey((java.lang.Boolean)value);
      }
      break;

    case NEED_MATERIALIZE:
      if (value == null) {
        unsetNeedMaterialize();
      } else {
        setNeedMaterialize((java.lang.Boolean)value);
      }
      break;

    case IS_AUTO_INCREMENT:
      if (value == null) {
        unsetIsAutoIncrement();
      } else {
        setIsAutoIncrement((java.lang.Boolean)value);
      }
      break;

    case COLUMN_PATHS:
      if (value == null) {
        unsetColumnPaths();
      } else {
        setColumnPaths((java.util.List<java.lang.String>)value);
      }
      break;

    case COL_DEFAULT_VALUE:
      if (value == null) {
        unsetColDefaultValue();
      } else {
        setColDefaultValue((java.lang.String)value);
      }
      break;

    case PRIMITIVE_TYPE:
      if (value == null) {
        unsetPrimitiveType();
      } else {
        setPrimitiveType((org.apache.doris.thrift.TPrimitiveType)value);
      }
      break;

    case VIRTUAL_COLUMN_EXPR:
      if (value == null) {
        unsetVirtualColumnExpr();
      } else {
        setVirtualColumnExpr((org.apache.doris.thrift.TExpr)value);
      }
      break;

    case ALL_ACCESS_PATHS:
      if (value == null) {
        unsetAllAccessPaths();
      } else {
        setAllAccessPaths((java.util.List<TColumnAccessPath>)value);
      }
      break;

    case PREDICATE_ACCESS_PATHS:
      if (value == null) {
        unsetPredicateAccessPaths();
      } else {
        setPredicateAccessPaths((java.util.List<TColumnAccessPath>)value);
      }
      break;

    }
  }

  @org.apache.thrift.annotation.Nullable
  public java.lang.Object getFieldValue(_Fields field) {
    switch (field) {
    case ID:
      return getId();

    case PARENT:
      return getParent();

    case SLOT_TYPE:
      return getSlotType();

    case COLUMN_POS:
      return getColumnPos();

    case BYTE_OFFSET:
      return getByteOffset();

    case NULL_INDICATOR_BYTE:
      return getNullIndicatorByte();

    case NULL_INDICATOR_BIT:
      return getNullIndicatorBit();

    case COL_NAME:
      return getColName();

    case SLOT_IDX:
      return getSlotIdx();

    case IS_MATERIALIZED:
      return isIsMaterialized();

    case COL_UNIQUE_ID:
      return getColUniqueId();

    case IS_KEY:
      return isIsKey();

    case NEED_MATERIALIZE:
      return isNeedMaterialize();

    case IS_AUTO_INCREMENT:
      return isIsAutoIncrement();

    case COLUMN_PATHS:
      return getColumnPaths();

    case COL_DEFAULT_VALUE:
      return getColDefaultValue();

    case PRIMITIVE_TYPE:
      return getPrimitiveType();

    case VIRTUAL_COLUMN_EXPR:
      return getVirtualColumnExpr();

    case ALL_ACCESS_PATHS:
      return getAllAccessPaths();

    case PREDICATE_ACCESS_PATHS:
      return getPredicateAccessPaths();

    }
    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 ID:
      return isSetId();
    case PARENT:
      return isSetParent();
    case SLOT_TYPE:
      return isSetSlotType();
    case COLUMN_POS:
      return isSetColumnPos();
    case BYTE_OFFSET:
      return isSetByteOffset();
    case NULL_INDICATOR_BYTE:
      return isSetNullIndicatorByte();
    case NULL_INDICATOR_BIT:
      return isSetNullIndicatorBit();
    case COL_NAME:
      return isSetColName();
    case SLOT_IDX:
      return isSetSlotIdx();
    case IS_MATERIALIZED:
      return isSetIsMaterialized();
    case COL_UNIQUE_ID:
      return isSetColUniqueId();
    case IS_KEY:
      return isSetIsKey();
    case NEED_MATERIALIZE:
      return isSetNeedMaterialize();
    case IS_AUTO_INCREMENT:
      return isSetIsAutoIncrement();
    case COLUMN_PATHS:
      return isSetColumnPaths();
    case COL_DEFAULT_VALUE:
      return isSetColDefaultValue();
    case PRIMITIVE_TYPE:
      return isSetPrimitiveType();
    case VIRTUAL_COLUMN_EXPR:
      return isSetVirtualColumnExpr();
    case ALL_ACCESS_PATHS:
      return isSetAllAccessPaths();
    case PREDICATE_ACCESS_PATHS:
      return isSetPredicateAccessPaths();
    }
    throw new java.lang.IllegalStateException();
  }

  @Override
  public boolean equals(java.lang.Object that) {
    if (that instanceof TSlotDescriptor)
      return this.equals((TSlotDescriptor)that);
    return false;
  }

  public boolean equals(TSlotDescriptor that) {
    if (that == null)
      return false;
    if (this == that)
      return true;

    boolean this_present_id = true;
    boolean that_present_id = true;
    if (this_present_id || that_present_id) {
      if (!(this_present_id && that_present_id))
        return false;
      if (this.id != that.id)
        return false;
    }

    boolean this_present_parent = true;
    boolean that_present_parent = true;
    if (this_present_parent || that_present_parent) {
      if (!(this_present_parent && that_present_parent))
        return false;
      if (this.parent != that.parent)
        return false;
    }

    boolean this_present_slotType = true && this.isSetSlotType();
    boolean that_present_slotType = true && that.isSetSlotType();
    if (this_present_slotType || that_present_slotType) {
      if (!(this_present_slotType && that_present_slotType))
        return false;
      if (!this.slotType.equals(that.slotType))
        return false;
    }

    boolean this_present_columnPos = true;
    boolean that_present_columnPos = true;
    if (this_present_columnPos || that_present_columnPos) {
      if (!(this_present_columnPos && that_present_columnPos))
        return false;
      if (this.columnPos != that.columnPos)
        return false;
    }

    boolean this_present_byteOffset = true;
    boolean that_present_byteOffset = true;
    if (this_present_byteOffset || that_present_byteOffset) {
      if (!(this_present_byteOffset && that_present_byteOffset))
        return false;
      if (this.byteOffset != that.byteOffset)
        return false;
    }

    boolean this_present_nullIndicatorByte = true;
    boolean that_present_nullIndicatorByte = true;
    if (this_present_nullIndicatorByte || that_present_nullIndicatorByte) {
      if (!(this_present_nullIndicatorByte && that_present_nullIndicatorByte))
        return false;
      if (this.nullIndicatorByte != that.nullIndicatorByte)
        return false;
    }

    boolean this_present_nullIndicatorBit = true;
    boolean that_present_nullIndicatorBit = true;
    if (this_present_nullIndicatorBit || that_present_nullIndicatorBit) {
      if (!(this_present_nullIndicatorBit && that_present_nullIndicatorBit))
        return false;
      if (this.nullIndicatorBit != that.nullIndicatorBit)
        return false;
    }

    boolean this_present_colName = true && this.isSetColName();
    boolean that_present_colName = true && that.isSetColName();
    if (this_present_colName || that_present_colName) {
      if (!(this_present_colName && that_present_colName))
        return false;
      if (!this.colName.equals(that.colName))
        return false;
    }

    boolean this_present_slotIdx = true;
    boolean that_present_slotIdx = true;
    if (this_present_slotIdx || that_present_slotIdx) {
      if (!(this_present_slotIdx && that_present_slotIdx))
        return false;
      if (this.slotIdx != that.slotIdx)
        return false;
    }

    boolean this_present_isMaterialized = true;
    boolean that_present_isMaterialized = true;
    if (this_present_isMaterialized || that_present_isMaterialized) {
      if (!(this_present_isMaterialized && that_present_isMaterialized))
        return false;
      if (this.isMaterialized != that.isMaterialized)
        return false;
    }

    boolean this_present_col_unique_id = true && this.isSetColUniqueId();
    boolean that_present_col_unique_id = true && that.isSetColUniqueId();
    if (this_present_col_unique_id || that_present_col_unique_id) {
      if (!(this_present_col_unique_id && that_present_col_unique_id))
        return false;
      if (this.col_unique_id != that.col_unique_id)
        return false;
    }

    boolean this_present_is_key = true && this.isSetIsKey();
    boolean that_present_is_key = true && that.isSetIsKey();
    if (this_present_is_key || that_present_is_key) {
      if (!(this_present_is_key && that_present_is_key))
        return false;
      if (this.is_key != that.is_key)
        return false;
    }

    boolean this_present_need_materialize = true && this.isSetNeedMaterialize();
    boolean that_present_need_materialize = true && that.isSetNeedMaterialize();
    if (this_present_need_materialize || that_present_need_materialize) {
      if (!(this_present_need_materialize && that_present_need_materialize))
        return false;
      if (this.need_materialize != that.need_materialize)
        return false;
    }

    boolean this_present_is_auto_increment = true && this.isSetIsAutoIncrement();
    boolean that_present_is_auto_increment = true && that.isSetIsAutoIncrement();
    if (this_present_is_auto_increment || that_present_is_auto_increment) {
      if (!(this_present_is_auto_increment && that_present_is_auto_increment))
        return false;
      if (this.is_auto_increment != that.is_auto_increment)
        return false;
    }

    boolean this_present_column_paths = true && this.isSetColumnPaths();
    boolean that_present_column_paths = true && that.isSetColumnPaths();
    if (this_present_column_paths || that_present_column_paths) {
      if (!(this_present_column_paths && that_present_column_paths))
        return false;
      if (!this.column_paths.equals(that.column_paths))
        return false;
    }

    boolean this_present_col_default_value = true && this.isSetColDefaultValue();
    boolean that_present_col_default_value = true && that.isSetColDefaultValue();
    if (this_present_col_default_value || that_present_col_default_value) {
      if (!(this_present_col_default_value && that_present_col_default_value))
        return false;
      if (!this.col_default_value.equals(that.col_default_value))
        return false;
    }

    boolean this_present_primitive_type = true && this.isSetPrimitiveType();
    boolean that_present_primitive_type = true && that.isSetPrimitiveType();
    if (this_present_primitive_type || that_present_primitive_type) {
      if (!(this_present_primitive_type && that_present_primitive_type))
        return false;
      if (!this.primitive_type.equals(that.primitive_type))
        return false;
    }

    boolean this_present_virtual_column_expr = true && this.isSetVirtualColumnExpr();
    boolean that_present_virtual_column_expr = true && that.isSetVirtualColumnExpr();
    if (this_present_virtual_column_expr || that_present_virtual_column_expr) {
      if (!(this_present_virtual_column_expr && that_present_virtual_column_expr))
        return false;
      if (!this.virtual_column_expr.equals(that.virtual_column_expr))
        return false;
    }

    boolean this_present_all_access_paths = true && this.isSetAllAccessPaths();
    boolean that_present_all_access_paths = true && that.isSetAllAccessPaths();
    if (this_present_all_access_paths || that_present_all_access_paths) {
      if (!(this_present_all_access_paths && that_present_all_access_paths))
        return false;
      if (!this.all_access_paths.equals(that.all_access_paths))
        return false;
    }

    boolean this_present_predicate_access_paths = true && this.isSetPredicateAccessPaths();
    boolean that_present_predicate_access_paths = true && that.isSetPredicateAccessPaths();
    if (this_present_predicate_access_paths || that_present_predicate_access_paths) {
      if (!(this_present_predicate_access_paths && that_present_predicate_access_paths))
        return false;
      if (!this.predicate_access_paths.equals(that.predicate_access_paths))
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    int hashCode = 1;

    hashCode = hashCode * 8191 + id;

    hashCode = hashCode * 8191 + parent;

    hashCode = hashCode * 8191 + ((isSetSlotType()) ? 131071 : 524287);
    if (isSetSlotType())
      hashCode = hashCode * 8191 + slotType.hashCode();

    hashCode = hashCode * 8191 + columnPos;

    hashCode = hashCode * 8191 + byteOffset;

    hashCode = hashCode * 8191 + nullIndicatorByte;

    hashCode = hashCode * 8191 + nullIndicatorBit;

    hashCode = hashCode * 8191 + ((isSetColName()) ? 131071 : 524287);
    if (isSetColName())
      hashCode = hashCode * 8191 + colName.hashCode();

    hashCode = hashCode * 8191 + slotIdx;

    hashCode = hashCode * 8191 + ((isMaterialized) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetColUniqueId()) ? 131071 : 524287);
    if (isSetColUniqueId())
      hashCode = hashCode * 8191 + col_unique_id;

    hashCode = hashCode * 8191 + ((isSetIsKey()) ? 131071 : 524287);
    if (isSetIsKey())
      hashCode = hashCode * 8191 + ((is_key) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetNeedMaterialize()) ? 131071 : 524287);
    if (isSetNeedMaterialize())
      hashCode = hashCode * 8191 + ((need_materialize) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetIsAutoIncrement()) ? 131071 : 524287);
    if (isSetIsAutoIncrement())
      hashCode = hashCode * 8191 + ((is_auto_increment) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetColumnPaths()) ? 131071 : 524287);
    if (isSetColumnPaths())
      hashCode = hashCode * 8191 + column_paths.hashCode();

    hashCode = hashCode * 8191 + ((isSetColDefaultValue()) ? 131071 : 524287);
    if (isSetColDefaultValue())
      hashCode = hashCode * 8191 + col_default_value.hashCode();

    hashCode = hashCode * 8191 + ((isSetPrimitiveType()) ? 131071 : 524287);
    if (isSetPrimitiveType())
      hashCode = hashCode * 8191 + primitive_type.getValue();

    hashCode = hashCode * 8191 + ((isSetVirtualColumnExpr()) ? 131071 : 524287);
    if (isSetVirtualColumnExpr())
      hashCode = hashCode * 8191 + virtual_column_expr.hashCode();

    hashCode = hashCode * 8191 + ((isSetAllAccessPaths()) ? 131071 : 524287);
    if (isSetAllAccessPaths())
      hashCode = hashCode * 8191 + all_access_paths.hashCode();

    hashCode = hashCode * 8191 + ((isSetPredicateAccessPaths()) ? 131071 : 524287);
    if (isSetPredicateAccessPaths())
      hashCode = hashCode * 8191 + predicate_access_paths.hashCode();

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetId(), other.isSetId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetParent(), other.isSetParent());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetParent()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parent, other.parent);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSlotType(), other.isSetSlotType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSlotType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.slotType, other.slotType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetColumnPos(), other.isSetColumnPos());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetColumnPos()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnPos, other.columnPos);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetByteOffset(), other.isSetByteOffset());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetByteOffset()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.byteOffset, other.byteOffset);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetNullIndicatorByte(), other.isSetNullIndicatorByte());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNullIndicatorByte()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nullIndicatorByte, other.nullIndicatorByte);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetNullIndicatorBit(), other.isSetNullIndicatorBit());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNullIndicatorBit()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nullIndicatorBit, other.nullIndicatorBit);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetColName(), other.isSetColName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetColName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colName, other.colName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSlotIdx(), other.isSetSlotIdx());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSlotIdx()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.slotIdx, other.slotIdx);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIsMaterialized(), other.isSetIsMaterialized());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsMaterialized()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isMaterialized, other.isMaterialized);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetColUniqueId(), other.isSetColUniqueId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetColUniqueId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_unique_id, other.col_unique_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIsKey(), other.isSetIsKey());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsKey()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_key, other.is_key);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetNeedMaterialize(), other.isSetNeedMaterialize());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNeedMaterialize()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.need_materialize, other.need_materialize);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIsAutoIncrement(), other.isSetIsAutoIncrement());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsAutoIncrement()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_auto_increment, other.is_auto_increment);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetColumnPaths(), other.isSetColumnPaths());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetColumnPaths()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_paths, other.column_paths);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetColDefaultValue(), other.isSetColDefaultValue());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetColDefaultValue()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_default_value, other.col_default_value);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetPrimitiveType(), other.isSetPrimitiveType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPrimitiveType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.primitive_type, other.primitive_type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetVirtualColumnExpr(), other.isSetVirtualColumnExpr());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetVirtualColumnExpr()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.virtual_column_expr, other.virtual_column_expr);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetAllAccessPaths(), other.isSetAllAccessPaths());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAllAccessPaths()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.all_access_paths, other.all_access_paths);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetPredicateAccessPaths(), other.isSetPredicateAccessPaths());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPredicateAccessPaths()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.predicate_access_paths, other.predicate_access_paths);
      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("TSlotDescriptor(");
    boolean first = true;

    sb.append("id:");
    sb.append(this.id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("parent:");
    sb.append(this.parent);
    first = false;
    if (!first) sb.append(", ");
    sb.append("slotType:");
    if (this.slotType == null) {
      sb.append("null");
    } else {
      sb.append(this.slotType);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("columnPos:");
    sb.append(this.columnPos);
    first = false;
    if (!first) sb.append(", ");
    sb.append("byteOffset:");
    sb.append(this.byteOffset);
    first = false;
    if (!first) sb.append(", ");
    sb.append("nullIndicatorByte:");
    sb.append(this.nullIndicatorByte);
    first = false;
    if (!first) sb.append(", ");
    sb.append("nullIndicatorBit:");
    sb.append(this.nullIndicatorBit);
    first = false;
    if (!first) sb.append(", ");
    sb.append("colName:");
    if (this.colName == null) {
      sb.append("null");
    } else {
      sb.append(this.colName);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("slotIdx:");
    sb.append(this.slotIdx);
    first = false;
    if (!first) sb.append(", ");
    sb.append("isMaterialized:");
    sb.append(this.isMaterialized);
    first = false;
    if (isSetColUniqueId()) {
      if (!first) sb.append(", ");
      sb.append("col_unique_id:");
      sb.append(this.col_unique_id);
      first = false;
    }
    if (isSetIsKey()) {
      if (!first) sb.append(", ");
      sb.append("is_key:");
      sb.append(this.is_key);
      first = false;
    }
    if (isSetNeedMaterialize()) {
      if (!first) sb.append(", ");
      sb.append("need_materialize:");
      sb.append(this.need_materialize);
      first = false;
    }
    if (isSetIsAutoIncrement()) {
      if (!first) sb.append(", ");
      sb.append("is_auto_increment:");
      sb.append(this.is_auto_increment);
      first = false;
    }
    if (isSetColumnPaths()) {
      if (!first) sb.append(", ");
      sb.append("column_paths:");
      if (this.column_paths == null) {
        sb.append("null");
      } else {
        sb.append(this.column_paths);
      }
      first = false;
    }
    if (isSetColDefaultValue()) {
      if (!first) sb.append(", ");
      sb.append("col_default_value:");
      if (this.col_default_value == null) {
        sb.append("null");
      } else {
        sb.append(this.col_default_value);
      }
      first = false;
    }
    if (isSetPrimitiveType()) {
      if (!first) sb.append(", ");
      sb.append("primitive_type:");
      if (this.primitive_type == null) {
        sb.append("null");
      } else {
        sb.append(this.primitive_type);
      }
      first = false;
    }
    if (isSetVirtualColumnExpr()) {
      if (!first) sb.append(", ");
      sb.append("virtual_column_expr:");
      if (this.virtual_column_expr == null) {
        sb.append("null");
      } else {
        sb.append(this.virtual_column_expr);
      }
      first = false;
    }
    if (isSetAllAccessPaths()) {
      if (!first) sb.append(", ");
      sb.append("all_access_paths:");
      if (this.all_access_paths == null) {
        sb.append("null");
      } else {
        sb.append(this.all_access_paths);
      }
      first = false;
    }
    if (isSetPredicateAccessPaths()) {
      if (!first) sb.append(", ");
      sb.append("predicate_access_paths:");
      if (this.predicate_access_paths == null) {
        sb.append("null");
      } else {
        sb.append(this.predicate_access_paths);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // alas, we cannot check 'id' because it's a primitive and you chose the non-beans generator.
    // alas, we cannot check 'parent' because it's a primitive and you chose the non-beans generator.
    if (slotType == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'slotType' was not present! Struct: " + toString());
    }
    // alas, we cannot check 'columnPos' because it's a primitive and you chose the non-beans generator.
    // alas, we cannot check 'byteOffset' because it's a primitive and you chose the non-beans generator.
    // alas, we cannot check 'nullIndicatorByte' because it's a primitive and you chose the non-beans generator.
    // alas, we cannot check 'nullIndicatorBit' because it's a primitive and you chose the non-beans generator.
    if (colName == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'colName' was not present! Struct: " + toString());
    }
    // alas, we cannot check 'slotIdx' because it's a primitive and you chose the non-beans generator.
    // alas, we cannot check 'isMaterialized' because it's a primitive and you chose the non-beans generator.
    // check for sub-struct validity
    if (slotType != null) {
      slotType.validate();
    }
    if (virtual_column_expr != null) {
      virtual_column_expr.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 TSlotDescriptorStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TSlotDescriptorStandardScheme getScheme() {
      return new TSlotDescriptorStandardScheme();
    }
  }

  private static class TSlotDescriptorStandardScheme extends org.apache.thrift.scheme.StandardScheme<TSlotDescriptor> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TSlotDescriptor 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: // ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.id = iprot.readI32();
              struct.setIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // PARENT
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.parent = iprot.readI32();
              struct.setParentIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // SLOT_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.slotType = new org.apache.doris.thrift.TTypeDesc();
              struct.slotType.read(iprot);
              struct.setSlotTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // COLUMN_POS
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.columnPos = iprot.readI32();
              struct.setColumnPosIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // BYTE_OFFSET
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.byteOffset = iprot.readI32();
              struct.setByteOffsetIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // NULL_INDICATOR_BYTE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.nullIndicatorByte = iprot.readI32();
              struct.setNullIndicatorByteIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // NULL_INDICATOR_BIT
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.nullIndicatorBit = iprot.readI32();
              struct.setNullIndicatorBitIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // COL_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.colName = iprot.readString();
              struct.setColNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // SLOT_IDX
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.slotIdx = iprot.readI32();
              struct.setSlotIdxIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // IS_MATERIALIZED
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.isMaterialized = iprot.readBool();
              struct.setIsMaterializedIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // COL_UNIQUE_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.col_unique_id = iprot.readI32();
              struct.setColUniqueIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 12: // IS_KEY
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.is_key = iprot.readBool();
              struct.setIsKeyIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 13: // NEED_MATERIALIZE
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.need_materialize = iprot.readBool();
              struct.setNeedMaterializeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 14: // IS_AUTO_INCREMENT
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.is_auto_increment = iprot.readBool();
              struct.setIsAutoIncrementIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 15: // COLUMN_PATHS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
                struct.column_paths = new java.util.ArrayList<java.lang.String>(_list24.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _elem25;
                for (int _i26 = 0; _i26 < _list24.size; ++_i26)
                {
                  _elem25 = iprot.readString();
                  struct.column_paths.add(_elem25);
                }
                iprot.readListEnd();
              }
              struct.setColumnPathsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 16: // COL_DEFAULT_VALUE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.col_default_value = iprot.readString();
              struct.setColDefaultValueIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 17: // PRIMITIVE_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.primitive_type = org.apache.doris.thrift.TPrimitiveType.findByValue(iprot.readI32());
              struct.setPrimitiveTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 18: // VIRTUAL_COLUMN_EXPR
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.virtual_column_expr = new org.apache.doris.thrift.TExpr();
              struct.virtual_column_expr.read(iprot);
              struct.setVirtualColumnExprIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 19: // ALL_ACCESS_PATHS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list27 = iprot.readListBegin();
                struct.all_access_paths = new java.util.ArrayList<TColumnAccessPath>(_list27.size);
                @org.apache.thrift.annotation.Nullable TColumnAccessPath _elem28;
                for (int _i29 = 0; _i29 < _list27.size; ++_i29)
                {
                  _elem28 = new TColumnAccessPath();
                  _elem28.read(iprot);
                  struct.all_access_paths.add(_elem28);
                }
                iprot.readListEnd();
              }
              struct.setAllAccessPathsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 20: // PREDICATE_ACCESS_PATHS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list30 = iprot.readListBegin();
                struct.predicate_access_paths = new java.util.ArrayList<TColumnAccessPath>(_list30.size);
                @org.apache.thrift.annotation.Nullable TColumnAccessPath _elem31;
                for (int _i32 = 0; _i32 < _list30.size; ++_i32)
                {
                  _elem31 = new TColumnAccessPath();
                  _elem31.read(iprot);
                  struct.predicate_access_paths.add(_elem31);
                }
                iprot.readListEnd();
              }
              struct.setPredicateAccessPathsIsSet(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.isSetId()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'id' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetParent()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'parent' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetColumnPos()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnPos' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetByteOffset()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'byteOffset' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetNullIndicatorByte()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'nullIndicatorByte' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetNullIndicatorBit()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'nullIndicatorBit' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetSlotIdx()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'slotIdx' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetIsMaterialized()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'isMaterialized' was not found in serialized data! Struct: " + toString());
      }
      struct.validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot, TSlotDescriptor struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ID_FIELD_DESC);
      oprot.writeI32(struct.id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(PARENT_FIELD_DESC);
      oprot.writeI32(struct.parent);
      oprot.writeFieldEnd();
      if (struct.slotType != null) {
        oprot.writeFieldBegin(SLOT_TYPE_FIELD_DESC);
        struct.slotType.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(COLUMN_POS_FIELD_DESC);
      oprot.writeI32(struct.columnPos);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(BYTE_OFFSET_FIELD_DESC);
      oprot.writeI32(struct.byteOffset);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(NULL_INDICATOR_BYTE_FIELD_DESC);
      oprot.writeI32(struct.nullIndicatorByte);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(NULL_INDICATOR_BIT_FIELD_DESC);
      oprot.writeI32(struct.nullIndicatorBit);
      oprot.writeFieldEnd();
      if (struct.colName != null) {
        oprot.writeFieldBegin(COL_NAME_FIELD_DESC);
        oprot.writeString(struct.colName);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(SLOT_IDX_FIELD_DESC);
      oprot.writeI32(struct.slotIdx);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(IS_MATERIALIZED_FIELD_DESC);
      oprot.writeBool(struct.isMaterialized);
      oprot.writeFieldEnd();
      if (struct.isSetColUniqueId()) {
        oprot.writeFieldBegin(COL_UNIQUE_ID_FIELD_DESC);
        oprot.writeI32(struct.col_unique_id);
        oprot.writeFieldEnd();
      }
      if (struct.isSetIsKey()) {
        oprot.writeFieldBegin(IS_KEY_FIELD_DESC);
        oprot.writeBool(struct.is_key);
        oprot.writeFieldEnd();
      }
      if (struct.isSetNeedMaterialize()) {
        oprot.writeFieldBegin(NEED_MATERIALIZE_FIELD_DESC);
        oprot.writeBool(struct.need_materialize);
        oprot.writeFieldEnd();
      }
      if (struct.isSetIsAutoIncrement()) {
        oprot.writeFieldBegin(IS_AUTO_INCREMENT_FIELD_DESC);
        oprot.writeBool(struct.is_auto_increment);
        oprot.writeFieldEnd();
      }
      if (struct.column_paths != null) {
        if (struct.isSetColumnPaths()) {
          oprot.writeFieldBegin(COLUMN_PATHS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.column_paths.size()));
            for (java.lang.String _iter33 : struct.column_paths)
            {
              oprot.writeString(_iter33);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.col_default_value != null) {
        if (struct.isSetColDefaultValue()) {
          oprot.writeFieldBegin(COL_DEFAULT_VALUE_FIELD_DESC);
          oprot.writeString(struct.col_default_value);
          oprot.writeFieldEnd();
        }
      }
      if (struct.primitive_type != null) {
        if (struct.isSetPrimitiveType()) {
          oprot.writeFieldBegin(PRIMITIVE_TYPE_FIELD_DESC);
          oprot.writeI32(struct.primitive_type.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.virtual_column_expr != null) {
        if (struct.isSetVirtualColumnExpr()) {
          oprot.writeFieldBegin(VIRTUAL_COLUMN_EXPR_FIELD_DESC);
          struct.virtual_column_expr.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.all_access_paths != null) {
        if (struct.isSetAllAccessPaths()) {
          oprot.writeFieldBegin(ALL_ACCESS_PATHS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.all_access_paths.size()));
            for (TColumnAccessPath _iter34 : struct.all_access_paths)
            {
              _iter34.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.predicate_access_paths != null) {
        if (struct.isSetPredicateAccessPaths()) {
          oprot.writeFieldBegin(PREDICATE_ACCESS_PATHS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.predicate_access_paths.size()));
            for (TColumnAccessPath _iter35 : struct.predicate_access_paths)
            {
              _iter35.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class TSlotDescriptorTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TSlotDescriptorTupleScheme getScheme() {
      return new TSlotDescriptorTupleScheme();
    }
  }

  private static class TSlotDescriptorTupleScheme extends org.apache.thrift.scheme.TupleScheme<TSlotDescriptor> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TSlotDescriptor struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      oprot.writeI32(struct.id);
      oprot.writeI32(struct.parent);
      struct.slotType.write(oprot);
      oprot.writeI32(struct.columnPos);
      oprot.writeI32(struct.byteOffset);
      oprot.writeI32(struct.nullIndicatorByte);
      oprot.writeI32(struct.nullIndicatorBit);
      oprot.writeString(struct.colName);
      oprot.writeI32(struct.slotIdx);
      oprot.writeBool(struct.isMaterialized);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetColUniqueId()) {
        optionals.set(0);
      }
      if (struct.isSetIsKey()) {
        optionals.set(1);
      }
      if (struct.isSetNeedMaterialize()) {
        optionals.set(2);
      }
      if (struct.isSetIsAutoIncrement()) {
        optionals.set(3);
      }
      if (struct.isSetColumnPaths()) {
        optionals.set(4);
      }
      if (struct.isSetColDefaultValue()) {
        optionals.set(5);
      }
      if (struct.isSetPrimitiveType()) {
        optionals.set(6);
      }
      if (struct.isSetVirtualColumnExpr()) {
        optionals.set(7);
      }
      if (struct.isSetAllAccessPaths()) {
        optionals.set(8);
      }
      if (struct.isSetPredicateAccessPaths()) {
        optionals.set(9);
      }
      oprot.writeBitSet(optionals, 10);
      if (struct.isSetColUniqueId()) {
        oprot.writeI32(struct.col_unique_id);
      }
      if (struct.isSetIsKey()) {
        oprot.writeBool(struct.is_key);
      }
      if (struct.isSetNeedMaterialize()) {
        oprot.writeBool(struct.need_materialize);
      }
      if (struct.isSetIsAutoIncrement()) {
        oprot.writeBool(struct.is_auto_increment);
      }
      if (struct.isSetColumnPaths()) {
        {
          oprot.writeI32(struct.column_paths.size());
          for (java.lang.String _iter36 : struct.column_paths)
          {
            oprot.writeString(_iter36);
          }
        }
      }
      if (struct.isSetColDefaultValue()) {
        oprot.writeString(struct.col_default_value);
      }
      if (struct.isSetPrimitiveType()) {
        oprot.writeI32(struct.primitive_type.getValue());
      }
      if (struct.isSetVirtualColumnExpr()) {
        struct.virtual_column_expr.write(oprot);
      }
      if (struct.isSetAllAccessPaths()) {
        {
          oprot.writeI32(struct.all_access_paths.size());
          for (TColumnAccessPath _iter37 : struct.all_access_paths)
          {
            _iter37.write(oprot);
          }
        }
      }
      if (struct.isSetPredicateAccessPaths()) {
        {
          oprot.writeI32(struct.predicate_access_paths.size());
          for (TColumnAccessPath _iter38 : struct.predicate_access_paths)
          {
            _iter38.write(oprot);
          }
        }
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TSlotDescriptor struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.id = iprot.readI32();
      struct.setIdIsSet(true);
      struct.parent = iprot.readI32();
      struct.setParentIsSet(true);
      struct.slotType = new org.apache.doris.thrift.TTypeDesc();
      struct.slotType.read(iprot);
      struct.setSlotTypeIsSet(true);
      struct.columnPos = iprot.readI32();
      struct.setColumnPosIsSet(true);
      struct.byteOffset = iprot.readI32();
      struct.setByteOffsetIsSet(true);
      struct.nullIndicatorByte = iprot.readI32();
      struct.setNullIndicatorByteIsSet(true);
      struct.nullIndicatorBit = iprot.readI32();
      struct.setNullIndicatorBitIsSet(true);
      struct.colName = iprot.readString();
      struct.setColNameIsSet(true);
      struct.slotIdx = iprot.readI32();
      struct.setSlotIdxIsSet(true);
      struct.isMaterialized = iprot.readBool();
      struct.setIsMaterializedIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(10);
      if (incoming.get(0)) {
        struct.col_unique_id = iprot.readI32();
        struct.setColUniqueIdIsSet(true);
      }
      if (incoming.get(1)) {
        struct.is_key = iprot.readBool();
        struct.setIsKeyIsSet(true);
      }
      if (incoming.get(2)) {
        struct.need_materialize = iprot.readBool();
        struct.setNeedMaterializeIsSet(true);
      }
      if (incoming.get(3)) {
        struct.is_auto_increment = iprot.readBool();
        struct.setIsAutoIncrementIsSet(true);
      }
      if (incoming.get(4)) {
        {
          org.apache.thrift.protocol.TList _list39 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
          struct.column_paths = new java.util.ArrayList<java.lang.String>(_list39.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _elem40;
          for (int _i41 = 0; _i41 < _list39.size; ++_i41)
          {
            _elem40 = iprot.readString();
            struct.column_paths.add(_elem40);
          }
        }
        struct.setColumnPathsIsSet(true);
      }
      if (incoming.get(5)) {
        struct.col_default_value = iprot.readString();
        struct.setColDefaultValueIsSet(true);
      }
      if (incoming.get(6)) {
        struct.primitive_type = org.apache.doris.thrift.TPrimitiveType.findByValue(iprot.readI32());
        struct.setPrimitiveTypeIsSet(true);
      }
      if (incoming.get(7)) {
        struct.virtual_column_expr = new org.apache.doris.thrift.TExpr();
        struct.virtual_column_expr.read(iprot);
        struct.setVirtualColumnExprIsSet(true);
      }
      if (incoming.get(8)) {
        {
          org.apache.thrift.protocol.TList _list42 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
          struct.all_access_paths = new java.util.ArrayList<TColumnAccessPath>(_list42.size);
          @org.apache.thrift.annotation.Nullable TColumnAccessPath _elem43;
          for (int _i44 = 0; _i44 < _list42.size; ++_i44)
          {
            _elem43 = new TColumnAccessPath();
            _elem43.read(iprot);
            struct.all_access_paths.add(_elem43);
          }
        }
        struct.setAllAccessPathsIsSet(true);
      }
      if (incoming.get(9)) {
        {
          org.apache.thrift.protocol.TList _list45 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
          struct.predicate_access_paths = new java.util.ArrayList<TColumnAccessPath>(_list45.size);
          @org.apache.thrift.annotation.Nullable TColumnAccessPath _elem46;
          for (int _i47 = 0; _i47 < _list45.size; ++_i47)
          {
            _elem46 = new TColumnAccessPath();
            _elem46.read(iprot);
            struct.predicate_access_paths.add(_elem46);
          }
        }
        struct.setPredicateAccessPathsIsSet(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();
  }
}