TMaterializationNode.java

/**
 * Autogenerated by Thrift Compiler (0.24.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"})
public class TMaterializationNode implements org.apache.thrift.TBase<TMaterializationNode, TMaterializationNode._Fields>, java.io.Serializable, Cloneable, Comparable<TMaterializationNode> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TMaterializationNode");

  private static final org.apache.thrift.protocol.TField TUPLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tuple_id", org.apache.thrift.protocol.TType.I32, (short)1);
  private static final org.apache.thrift.protocol.TField INTERMEDIATE_TUPLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("intermediate_tuple_id", org.apache.thrift.protocol.TType.I32, (short)2);
  private static final org.apache.thrift.protocol.TField NODES_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("nodes_info", org.apache.thrift.protocol.TType.STRUCT, (short)3);
  private static final org.apache.thrift.protocol.TField FETCH_EXPR_LISTS_FIELD_DESC = new org.apache.thrift.protocol.TField("fetch_expr_lists", org.apache.thrift.protocol.TType.LIST, (short)4);
  private static final org.apache.thrift.protocol.TField COLUMN_DESCS_LISTS_FIELD_DESC = new org.apache.thrift.protocol.TField("column_descs_lists", org.apache.thrift.protocol.TType.LIST, (short)5);
  private static final org.apache.thrift.protocol.TField SLOT_LOCS_LISTS_FIELD_DESC = new org.apache.thrift.protocol.TField("slot_locs_lists", org.apache.thrift.protocol.TType.LIST, (short)6);
  private static final org.apache.thrift.protocol.TField FETCH_ROW_STORES_FIELD_DESC = new org.apache.thrift.protocol.TField("fetch_row_stores", org.apache.thrift.protocol.TType.LIST, (short)7);
  private static final org.apache.thrift.protocol.TField GC_ID_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("gc_id_map", org.apache.thrift.protocol.TType.BOOL, (short)8);
  private static final org.apache.thrift.protocol.TField COLUMN_IDXS_LISTS_FIELD_DESC = new org.apache.thrift.protocol.TField("column_idxs_lists", org.apache.thrift.protocol.TType.LIST, (short)9);

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

  public int tuple_id; // optional
  public int intermediate_tuple_id; // optional
  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TPaloNodesInfo nodes_info; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TExpr> fetch_expr_lists; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.util.List<org.apache.doris.thrift.TColumn>> column_descs_lists; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.util.List<java.lang.Integer>> slot_locs_lists; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Boolean> fetch_row_stores; // optional
  public boolean gc_id_map; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.util.List<java.lang.Integer>> column_idxs_lists; // 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 {
    TUPLE_ID((short)1, "tuple_id"),
    INTERMEDIATE_TUPLE_ID((short)2, "intermediate_tuple_id"),
    NODES_INFO((short)3, "nodes_info"),
    FETCH_EXPR_LISTS((short)4, "fetch_expr_lists"),
    COLUMN_DESCS_LISTS((short)5, "column_descs_lists"),
    SLOT_LOCS_LISTS((short)6, "slot_locs_lists"),
    FETCH_ROW_STORES((short)7, "fetch_row_stores"),
    GC_ID_MAP((short)8, "gc_id_map"),
    COLUMN_IDXS_LISTS((short)9, "column_idxs_lists");

    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: // TUPLE_ID
          return TUPLE_ID;
        case 2: // INTERMEDIATE_TUPLE_ID
          return INTERMEDIATE_TUPLE_ID;
        case 3: // NODES_INFO
          return NODES_INFO;
        case 4: // FETCH_EXPR_LISTS
          return FETCH_EXPR_LISTS;
        case 5: // COLUMN_DESCS_LISTS
          return COLUMN_DESCS_LISTS;
        case 6: // SLOT_LOCS_LISTS
          return SLOT_LOCS_LISTS;
        case 7: // FETCH_ROW_STORES
          return FETCH_ROW_STORES;
        case 8: // GC_ID_MAP
          return GC_ID_MAP;
        case 9: // COLUMN_IDXS_LISTS
          return COLUMN_IDXS_LISTS;
        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;
    }

    @Override
    public short getThriftFieldId() {
      return _thriftId;
    }

    @Override
    public java.lang.String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final int __TUPLE_ID_ISSET_ID = 0;
  private static final int __INTERMEDIATE_TUPLE_ID_ISSET_ID = 1;
  private static final int __GC_ID_MAP_ISSET_ID = 2;
  private byte __isset_bitfield = 0;
  private static final _Fields[] optionals = {_Fields.TUPLE_ID,_Fields.INTERMEDIATE_TUPLE_ID,_Fields.NODES_INFO,_Fields.FETCH_EXPR_LISTS,_Fields.COLUMN_DESCS_LISTS,_Fields.SLOT_LOCS_LISTS,_Fields.FETCH_ROW_STORES,_Fields.GC_ID_MAP,_Fields.COLUMN_IDXS_LISTS};
  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.TUPLE_ID, new org.apache.thrift.meta_data.FieldMetaData("tuple_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32        , "TTupleId")));
    tmpMap.put(_Fields.INTERMEDIATE_TUPLE_ID, new org.apache.thrift.meta_data.FieldMetaData("intermediate_tuple_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32        , "TTupleId")));
    tmpMap.put(_Fields.NODES_INFO, new org.apache.thrift.meta_data.FieldMetaData("nodes_info", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TPaloNodesInfo.class)));
    tmpMap.put(_Fields.FETCH_EXPR_LISTS, new org.apache.thrift.meta_data.FieldMetaData("fetch_expr_lists", 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, org.apache.doris.thrift.TExpr.class))));
    tmpMap.put(_Fields.COLUMN_DESCS_LISTS, new org.apache.thrift.meta_data.FieldMetaData("column_descs_lists", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            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, org.apache.doris.thrift.TColumn.class)))));
    tmpMap.put(_Fields.SLOT_LOCS_LISTS, new org.apache.thrift.meta_data.FieldMetaData("slot_locs_lists", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            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.I32)))));
    tmpMap.put(_Fields.FETCH_ROW_STORES, new org.apache.thrift.meta_data.FieldMetaData("fetch_row_stores", 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.BOOL))));
    tmpMap.put(_Fields.GC_ID_MAP, new org.apache.thrift.meta_data.FieldMetaData("gc_id_map", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.COLUMN_IDXS_LISTS, new org.apache.thrift.meta_data.FieldMetaData("column_idxs_lists", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            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.I32)))));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TMaterializationNode.class, metaDataMap);
  }

  public TMaterializationNode() {
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TMaterializationNode(TMaterializationNode other) {
    __isset_bitfield = other.__isset_bitfield;
    this.tuple_id = other.tuple_id;
    this.intermediate_tuple_id = other.intermediate_tuple_id;
    if (other.isSetNodesInfo()) {
      this.nodes_info = new org.apache.doris.thrift.TPaloNodesInfo(other.nodes_info);
    }
    if (other.isSetFetchExprLists()) {
      java.util.List<org.apache.doris.thrift.TExpr> __this__fetch_expr_lists = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(other.fetch_expr_lists.size());
      for (org.apache.doris.thrift.TExpr other_element : other.fetch_expr_lists) {
        __this__fetch_expr_lists.add(new org.apache.doris.thrift.TExpr(other_element));
      }
      this.fetch_expr_lists = __this__fetch_expr_lists;
    }
    if (other.isSetColumnDescsLists()) {
      java.util.List<java.util.List<org.apache.doris.thrift.TColumn>> __this__column_descs_lists = new java.util.ArrayList<java.util.List<org.apache.doris.thrift.TColumn>>(other.column_descs_lists.size());
      for (java.util.List<org.apache.doris.thrift.TColumn> other_element : other.column_descs_lists) {
        java.util.List<org.apache.doris.thrift.TColumn> __this__column_descs_lists_copy = new java.util.ArrayList<org.apache.doris.thrift.TColumn>(other_element.size());
        for (org.apache.doris.thrift.TColumn other_element_element : other_element) {
          __this__column_descs_lists_copy.add(new org.apache.doris.thrift.TColumn(other_element_element));
        }
        __this__column_descs_lists.add(__this__column_descs_lists_copy);
      }
      this.column_descs_lists = __this__column_descs_lists;
    }
    if (other.isSetSlotLocsLists()) {
      java.util.List<java.util.List<java.lang.Integer>> __this__slot_locs_lists = new java.util.ArrayList<java.util.List<java.lang.Integer>>(other.slot_locs_lists.size());
      for (java.util.List<java.lang.Integer> other_element : other.slot_locs_lists) {
        java.util.List<java.lang.Integer> __this__slot_locs_lists_copy = new java.util.ArrayList<java.lang.Integer>(other_element);
        __this__slot_locs_lists.add(__this__slot_locs_lists_copy);
      }
      this.slot_locs_lists = __this__slot_locs_lists;
    }
    if (other.isSetFetchRowStores()) {
      java.util.List<java.lang.Boolean> __this__fetch_row_stores = new java.util.ArrayList<java.lang.Boolean>(other.fetch_row_stores);
      this.fetch_row_stores = __this__fetch_row_stores;
    }
    this.gc_id_map = other.gc_id_map;
    if (other.isSetColumnIdxsLists()) {
      java.util.List<java.util.List<java.lang.Integer>> __this__column_idxs_lists = new java.util.ArrayList<java.util.List<java.lang.Integer>>(other.column_idxs_lists.size());
      for (java.util.List<java.lang.Integer> other_element : other.column_idxs_lists) {
        java.util.List<java.lang.Integer> __this__column_idxs_lists_copy = new java.util.ArrayList<java.lang.Integer>(other_element);
        __this__column_idxs_lists.add(__this__column_idxs_lists_copy);
      }
      this.column_idxs_lists = __this__column_idxs_lists;
    }
  }

  @Override
  public TMaterializationNode deepCopy() {
    return new TMaterializationNode(this);
  }

  @Override
  public void clear() {
    setTupleIdIsSet(false);
    this.tuple_id = 0;
    setIntermediateTupleIdIsSet(false);
    this.intermediate_tuple_id = 0;
    this.nodes_info = null;
    this.fetch_expr_lists = null;
    this.column_descs_lists = null;
    this.slot_locs_lists = null;
    this.fetch_row_stores = null;
    setGcIdMapIsSet(false);
    this.gc_id_map = false;
    this.column_idxs_lists = null;
  }

  public int getTupleId() {
    return this.tuple_id;
  }

  public TMaterializationNode setTupleId(int tuple_id) {
    this.tuple_id = tuple_id;
    setTupleIdIsSet(true);
    return this;
  }

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

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

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

  public int getIntermediateTupleId() {
    return this.intermediate_tuple_id;
  }

  public TMaterializationNode setIntermediateTupleId(int intermediate_tuple_id) {
    this.intermediate_tuple_id = intermediate_tuple_id;
    setIntermediateTupleIdIsSet(true);
    return this;
  }

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

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

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

  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TPaloNodesInfo getNodesInfo() {
    return this.nodes_info;
  }

  public TMaterializationNode setNodesInfo(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TPaloNodesInfo nodes_info) {
    this.nodes_info = nodes_info;
    return this;
  }

  public void unsetNodesInfo() {
    this.nodes_info = null;
  }

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

  public void setNodesInfoIsSet(boolean value) {
    if (!value) {
      this.nodes_info = null;
    }
  }

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

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<org.apache.doris.thrift.TExpr> getFetchExprListsIterator() {
    return (this.fetch_expr_lists == null) ? null : this.fetch_expr_lists.iterator();
  }

  public void addToFetchExprLists(org.apache.doris.thrift.TExpr elem) {
    if (this.fetch_expr_lists == null) {
      this.fetch_expr_lists = new java.util.ArrayList<org.apache.doris.thrift.TExpr>();
    }
    this.fetch_expr_lists.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<org.apache.doris.thrift.TExpr> getFetchExprLists() {
    return this.fetch_expr_lists;
  }

  public TMaterializationNode setFetchExprLists(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TExpr> fetch_expr_lists) {
    this.fetch_expr_lists = fetch_expr_lists;
    return this;
  }

  public void unsetFetchExprLists() {
    this.fetch_expr_lists = null;
  }

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

  public void setFetchExprListsIsSet(boolean value) {
    if (!value) {
      this.fetch_expr_lists = null;
    }
  }

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

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<java.util.List<org.apache.doris.thrift.TColumn>> getColumnDescsListsIterator() {
    return (this.column_descs_lists == null) ? null : this.column_descs_lists.iterator();
  }

  public void addToColumnDescsLists(java.util.List<org.apache.doris.thrift.TColumn> elem) {
    if (this.column_descs_lists == null) {
      this.column_descs_lists = new java.util.ArrayList<java.util.List<org.apache.doris.thrift.TColumn>>();
    }
    this.column_descs_lists.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<java.util.List<org.apache.doris.thrift.TColumn>> getColumnDescsLists() {
    return this.column_descs_lists;
  }

  public TMaterializationNode setColumnDescsLists(@org.apache.thrift.annotation.Nullable java.util.List<java.util.List<org.apache.doris.thrift.TColumn>> column_descs_lists) {
    this.column_descs_lists = column_descs_lists;
    return this;
  }

  public void unsetColumnDescsLists() {
    this.column_descs_lists = null;
  }

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

  public void setColumnDescsListsIsSet(boolean value) {
    if (!value) {
      this.column_descs_lists = null;
    }
  }

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

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<java.util.List<java.lang.Integer>> getSlotLocsListsIterator() {
    return (this.slot_locs_lists == null) ? null : this.slot_locs_lists.iterator();
  }

  public void addToSlotLocsLists(java.util.List<java.lang.Integer> elem) {
    if (this.slot_locs_lists == null) {
      this.slot_locs_lists = new java.util.ArrayList<java.util.List<java.lang.Integer>>();
    }
    this.slot_locs_lists.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<java.util.List<java.lang.Integer>> getSlotLocsLists() {
    return this.slot_locs_lists;
  }

  public TMaterializationNode setSlotLocsLists(@org.apache.thrift.annotation.Nullable java.util.List<java.util.List<java.lang.Integer>> slot_locs_lists) {
    this.slot_locs_lists = slot_locs_lists;
    return this;
  }

  public void unsetSlotLocsLists() {
    this.slot_locs_lists = null;
  }

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

  public void setSlotLocsListsIsSet(boolean value) {
    if (!value) {
      this.slot_locs_lists = null;
    }
  }

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

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

  public void addToFetchRowStores(boolean elem) {
    if (this.fetch_row_stores == null) {
      this.fetch_row_stores = new java.util.ArrayList<java.lang.Boolean>();
    }
    this.fetch_row_stores.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<java.lang.Boolean> getFetchRowStores() {
    return this.fetch_row_stores;
  }

  public TMaterializationNode setFetchRowStores(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Boolean> fetch_row_stores) {
    this.fetch_row_stores = fetch_row_stores;
    return this;
  }

  public void unsetFetchRowStores() {
    this.fetch_row_stores = null;
  }

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

  public void setFetchRowStoresIsSet(boolean value) {
    if (!value) {
      this.fetch_row_stores = null;
    }
  }

  public boolean isGcIdMap() {
    return this.gc_id_map;
  }

  public TMaterializationNode setGcIdMap(boolean gc_id_map) {
    this.gc_id_map = gc_id_map;
    setGcIdMapIsSet(true);
    return this;
  }

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

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

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

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

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<java.util.List<java.lang.Integer>> getColumnIdxsListsIterator() {
    return (this.column_idxs_lists == null) ? null : this.column_idxs_lists.iterator();
  }

  public void addToColumnIdxsLists(java.util.List<java.lang.Integer> elem) {
    if (this.column_idxs_lists == null) {
      this.column_idxs_lists = new java.util.ArrayList<java.util.List<java.lang.Integer>>();
    }
    this.column_idxs_lists.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<java.util.List<java.lang.Integer>> getColumnIdxsLists() {
    return this.column_idxs_lists;
  }

  public TMaterializationNode setColumnIdxsLists(@org.apache.thrift.annotation.Nullable java.util.List<java.util.List<java.lang.Integer>> column_idxs_lists) {
    this.column_idxs_lists = column_idxs_lists;
    return this;
  }

  public void unsetColumnIdxsLists() {
    this.column_idxs_lists = null;
  }

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

  public void setColumnIdxsListsIsSet(boolean value) {
    if (!value) {
      this.column_idxs_lists = null;
    }
  }

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

    case INTERMEDIATE_TUPLE_ID:
      if (value == null) {
        unsetIntermediateTupleId();
      } else {
        setIntermediateTupleId((java.lang.Integer)value);
      }
      break;

    case NODES_INFO:
      if (value == null) {
        unsetNodesInfo();
      } else {
        setNodesInfo((org.apache.doris.thrift.TPaloNodesInfo)value);
      }
      break;

    case FETCH_EXPR_LISTS:
      if (value == null) {
        unsetFetchExprLists();
      } else {
        setFetchExprLists((java.util.List<org.apache.doris.thrift.TExpr>)value);
      }
      break;

    case COLUMN_DESCS_LISTS:
      if (value == null) {
        unsetColumnDescsLists();
      } else {
        setColumnDescsLists((java.util.List<java.util.List<org.apache.doris.thrift.TColumn>>)value);
      }
      break;

    case SLOT_LOCS_LISTS:
      if (value == null) {
        unsetSlotLocsLists();
      } else {
        setSlotLocsLists((java.util.List<java.util.List<java.lang.Integer>>)value);
      }
      break;

    case FETCH_ROW_STORES:
      if (value == null) {
        unsetFetchRowStores();
      } else {
        setFetchRowStores((java.util.List<java.lang.Boolean>)value);
      }
      break;

    case GC_ID_MAP:
      if (value == null) {
        unsetGcIdMap();
      } else {
        setGcIdMap((java.lang.Boolean)value);
      }
      break;

    case COLUMN_IDXS_LISTS:
      if (value == null) {
        unsetColumnIdxsLists();
      } else {
        setColumnIdxsLists((java.util.List<java.util.List<java.lang.Integer>>)value);
      }
      break;

    }
  }

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

    case INTERMEDIATE_TUPLE_ID:
      return getIntermediateTupleId();

    case NODES_INFO:
      return getNodesInfo();

    case FETCH_EXPR_LISTS:
      return getFetchExprLists();

    case COLUMN_DESCS_LISTS:
      return getColumnDescsLists();

    case SLOT_LOCS_LISTS:
      return getSlotLocsLists();

    case FETCH_ROW_STORES:
      return getFetchRowStores();

    case GC_ID_MAP:
      return isGcIdMap();

    case COLUMN_IDXS_LISTS:
      return getColumnIdxsLists();

    }
    throw new java.lang.IllegalStateException();
  }

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

    switch (field) {
    case TUPLE_ID:
      return isSetTupleId();
    case INTERMEDIATE_TUPLE_ID:
      return isSetIntermediateTupleId();
    case NODES_INFO:
      return isSetNodesInfo();
    case FETCH_EXPR_LISTS:
      return isSetFetchExprLists();
    case COLUMN_DESCS_LISTS:
      return isSetColumnDescsLists();
    case SLOT_LOCS_LISTS:
      return isSetSlotLocsLists();
    case FETCH_ROW_STORES:
      return isSetFetchRowStores();
    case GC_ID_MAP:
      return isSetGcIdMap();
    case COLUMN_IDXS_LISTS:
      return isSetColumnIdxsLists();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_tuple_id = true && this.isSetTupleId();
    boolean that_present_tuple_id = true && that.isSetTupleId();
    if (this_present_tuple_id || that_present_tuple_id) {
      if (!(this_present_tuple_id && that_present_tuple_id))
        return false;
      if (this.tuple_id != that.tuple_id)
        return false;
    }

    boolean this_present_intermediate_tuple_id = true && this.isSetIntermediateTupleId();
    boolean that_present_intermediate_tuple_id = true && that.isSetIntermediateTupleId();
    if (this_present_intermediate_tuple_id || that_present_intermediate_tuple_id) {
      if (!(this_present_intermediate_tuple_id && that_present_intermediate_tuple_id))
        return false;
      if (this.intermediate_tuple_id != that.intermediate_tuple_id)
        return false;
    }

    boolean this_present_nodes_info = true && this.isSetNodesInfo();
    boolean that_present_nodes_info = true && that.isSetNodesInfo();
    if (this_present_nodes_info || that_present_nodes_info) {
      if (!(this_present_nodes_info && that_present_nodes_info))
        return false;
      if (!this.nodes_info.equals(that.nodes_info))
        return false;
    }

    boolean this_present_fetch_expr_lists = true && this.isSetFetchExprLists();
    boolean that_present_fetch_expr_lists = true && that.isSetFetchExprLists();
    if (this_present_fetch_expr_lists || that_present_fetch_expr_lists) {
      if (!(this_present_fetch_expr_lists && that_present_fetch_expr_lists))
        return false;
      if (!this.fetch_expr_lists.equals(that.fetch_expr_lists))
        return false;
    }

    boolean this_present_column_descs_lists = true && this.isSetColumnDescsLists();
    boolean that_present_column_descs_lists = true && that.isSetColumnDescsLists();
    if (this_present_column_descs_lists || that_present_column_descs_lists) {
      if (!(this_present_column_descs_lists && that_present_column_descs_lists))
        return false;
      if (!this.column_descs_lists.equals(that.column_descs_lists))
        return false;
    }

    boolean this_present_slot_locs_lists = true && this.isSetSlotLocsLists();
    boolean that_present_slot_locs_lists = true && that.isSetSlotLocsLists();
    if (this_present_slot_locs_lists || that_present_slot_locs_lists) {
      if (!(this_present_slot_locs_lists && that_present_slot_locs_lists))
        return false;
      if (!this.slot_locs_lists.equals(that.slot_locs_lists))
        return false;
    }

    boolean this_present_fetch_row_stores = true && this.isSetFetchRowStores();
    boolean that_present_fetch_row_stores = true && that.isSetFetchRowStores();
    if (this_present_fetch_row_stores || that_present_fetch_row_stores) {
      if (!(this_present_fetch_row_stores && that_present_fetch_row_stores))
        return false;
      if (!this.fetch_row_stores.equals(that.fetch_row_stores))
        return false;
    }

    boolean this_present_gc_id_map = true && this.isSetGcIdMap();
    boolean that_present_gc_id_map = true && that.isSetGcIdMap();
    if (this_present_gc_id_map || that_present_gc_id_map) {
      if (!(this_present_gc_id_map && that_present_gc_id_map))
        return false;
      if (this.gc_id_map != that.gc_id_map)
        return false;
    }

    boolean this_present_column_idxs_lists = true && this.isSetColumnIdxsLists();
    boolean that_present_column_idxs_lists = true && that.isSetColumnIdxsLists();
    if (this_present_column_idxs_lists || that_present_column_idxs_lists) {
      if (!(this_present_column_idxs_lists && that_present_column_idxs_lists))
        return false;
      if (!this.column_idxs_lists.equals(that.column_idxs_lists))
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetTupleId()) ? 131071 : 524287);
    if (isSetTupleId())
      hashCode = hashCode * 8191 + tuple_id;

    hashCode = hashCode * 8191 + ((isSetIntermediateTupleId()) ? 131071 : 524287);
    if (isSetIntermediateTupleId())
      hashCode = hashCode * 8191 + intermediate_tuple_id;

    hashCode = hashCode * 8191 + ((isSetNodesInfo()) ? 131071 : 524287);
    if (isSetNodesInfo())
      hashCode = hashCode * 8191 + nodes_info.hashCode();

    hashCode = hashCode * 8191 + ((isSetFetchExprLists()) ? 131071 : 524287);
    if (isSetFetchExprLists())
      hashCode = hashCode * 8191 + fetch_expr_lists.hashCode();

    hashCode = hashCode * 8191 + ((isSetColumnDescsLists()) ? 131071 : 524287);
    if (isSetColumnDescsLists())
      hashCode = hashCode * 8191 + column_descs_lists.hashCode();

    hashCode = hashCode * 8191 + ((isSetSlotLocsLists()) ? 131071 : 524287);
    if (isSetSlotLocsLists())
      hashCode = hashCode * 8191 + slot_locs_lists.hashCode();

    hashCode = hashCode * 8191 + ((isSetFetchRowStores()) ? 131071 : 524287);
    if (isSetFetchRowStores())
      hashCode = hashCode * 8191 + fetch_row_stores.hashCode();

    hashCode = hashCode * 8191 + ((isSetGcIdMap()) ? 131071 : 524287);
    if (isSetGcIdMap())
      hashCode = hashCode * 8191 + ((gc_id_map) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetColumnIdxsLists()) ? 131071 : 524287);
    if (isSetColumnIdxsLists())
      hashCode = hashCode * 8191 + column_idxs_lists.hashCode();

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetTupleId(), other.isSetTupleId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTupleId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tuple_id, other.tuple_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIntermediateTupleId(), other.isSetIntermediateTupleId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIntermediateTupleId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.intermediate_tuple_id, other.intermediate_tuple_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetNodesInfo(), other.isSetNodesInfo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNodesInfo()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodes_info, other.nodes_info);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetFetchExprLists(), other.isSetFetchExprLists());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFetchExprLists()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetch_expr_lists, other.fetch_expr_lists);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetColumnDescsLists(), other.isSetColumnDescsLists());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetColumnDescsLists()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_descs_lists, other.column_descs_lists);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSlotLocsLists(), other.isSetSlotLocsLists());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSlotLocsLists()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.slot_locs_lists, other.slot_locs_lists);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetFetchRowStores(), other.isSetFetchRowStores());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFetchRowStores()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetch_row_stores, other.fetch_row_stores);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetGcIdMap(), other.isSetGcIdMap());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetGcIdMap()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gc_id_map, other.gc_id_map);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetColumnIdxsLists(), other.isSetColumnIdxsLists());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetColumnIdxsLists()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_idxs_lists, other.column_idxs_lists);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  @org.apache.thrift.annotation.Nullable
  @Override
  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  @Override
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    scheme(iprot).read(iprot, this);
  }

  @Override
  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("TMaterializationNode(");
    boolean first = true;

    if (isSetTupleId()) {
      sb.append("tuple_id:");
      sb.append(this.tuple_id);
      first = false;
    }
    if (isSetIntermediateTupleId()) {
      if (!first) sb.append(", ");
      sb.append("intermediate_tuple_id:");
      sb.append(this.intermediate_tuple_id);
      first = false;
    }
    if (isSetNodesInfo()) {
      if (!first) sb.append(", ");
      sb.append("nodes_info:");
      if (this.nodes_info == null) {
        sb.append("null");
      } else {
        sb.append(this.nodes_info);
      }
      first = false;
    }
    if (isSetFetchExprLists()) {
      if (!first) sb.append(", ");
      sb.append("fetch_expr_lists:");
      if (this.fetch_expr_lists == null) {
        sb.append("null");
      } else {
        sb.append(this.fetch_expr_lists);
      }
      first = false;
    }
    if (isSetColumnDescsLists()) {
      if (!first) sb.append(", ");
      sb.append("column_descs_lists:");
      if (this.column_descs_lists == null) {
        sb.append("null");
      } else {
        sb.append(this.column_descs_lists);
      }
      first = false;
    }
    if (isSetSlotLocsLists()) {
      if (!first) sb.append(", ");
      sb.append("slot_locs_lists:");
      if (this.slot_locs_lists == null) {
        sb.append("null");
      } else {
        sb.append(this.slot_locs_lists);
      }
      first = false;
    }
    if (isSetFetchRowStores()) {
      if (!first) sb.append(", ");
      sb.append("fetch_row_stores:");
      if (this.fetch_row_stores == null) {
        sb.append("null");
      } else {
        sb.append(this.fetch_row_stores);
      }
      first = false;
    }
    if (isSetGcIdMap()) {
      if (!first) sb.append(", ");
      sb.append("gc_id_map:");
      sb.append(this.gc_id_map);
      first = false;
    }
    if (isSetColumnIdxsLists()) {
      if (!first) sb.append(", ");
      sb.append("column_idxs_lists:");
      if (this.column_idxs_lists == null) {
        sb.append("null");
      } else {
        sb.append(this.column_idxs_lists);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // check for sub-struct validity
    if (nodes_info != null) {
      nodes_info.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 TMaterializationNodeStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    @Override
    public TMaterializationNodeStandardScheme getScheme() {
      return new TMaterializationNodeStandardScheme();
    }
  }

  private static class TMaterializationNodeStandardScheme extends org.apache.thrift.scheme.StandardScheme<TMaterializationNode> {

    @Override
    public void read(org.apache.thrift.protocol.TProtocol iprot, TMaterializationNode struct) throws org.apache.thrift.TException {
      iprot.incrementRecursionDepth();
      try {
        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: // TUPLE_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.tuple_id = iprot.readI32();
                struct.setTupleIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // INTERMEDIATE_TUPLE_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.intermediate_tuple_id = iprot.readI32();
                struct.setIntermediateTupleIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // NODES_INFO
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.nodes_info = new org.apache.doris.thrift.TPaloNodesInfo();
                struct.nodes_info.read(iprot);
                struct.setNodesInfoIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // FETCH_EXPR_LISTS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list920 = iprot.readListBegin();
                  struct.fetch_expr_lists = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(_list920.size);
                  @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr _elem921;
                  for (int _i922 = 0; _i922 < _list920.size; ++_i922)
                  {
                    _elem921 = new org.apache.doris.thrift.TExpr();
                    _elem921.read(iprot);
                    struct.fetch_expr_lists.add(_elem921);
                  }
                  iprot.readListEnd();
                }
                struct.setFetchExprListsIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 5: // COLUMN_DESCS_LISTS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list923 = iprot.readListBegin();
                  struct.column_descs_lists = new java.util.ArrayList<java.util.List<org.apache.doris.thrift.TColumn>>(_list923.size);
                  @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TColumn> _elem924;
                  for (int _i925 = 0; _i925 < _list923.size; ++_i925)
                  {
                    {
                      org.apache.thrift.protocol.TList _list926 = iprot.readListBegin();
                      _elem924 = new java.util.ArrayList<org.apache.doris.thrift.TColumn>(_list926.size);
                      @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TColumn _elem927;
                      for (int _i928 = 0; _i928 < _list926.size; ++_i928)
                      {
                        _elem927 = new org.apache.doris.thrift.TColumn();
                        _elem927.read(iprot);
                        _elem924.add(_elem927);
                      }
                      iprot.readListEnd();
                    }
                    struct.column_descs_lists.add(_elem924);
                  }
                  iprot.readListEnd();
                }
                struct.setColumnDescsListsIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 6: // SLOT_LOCS_LISTS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list929 = iprot.readListBegin();
                  struct.slot_locs_lists = new java.util.ArrayList<java.util.List<java.lang.Integer>>(_list929.size);
                  @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> _elem930;
                  for (int _i931 = 0; _i931 < _list929.size; ++_i931)
                  {
                    {
                      org.apache.thrift.protocol.TList _list932 = iprot.readListBegin();
                      _elem930 = new java.util.ArrayList<java.lang.Integer>(_list932.size);
                      int _elem933;
                      for (int _i934 = 0; _i934 < _list932.size; ++_i934)
                      {
                        _elem933 = iprot.readI32();
                        _elem930.add(_elem933);
                      }
                      iprot.readListEnd();
                    }
                    struct.slot_locs_lists.add(_elem930);
                  }
                  iprot.readListEnd();
                }
                struct.setSlotLocsListsIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 7: // FETCH_ROW_STORES
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list935 = iprot.readListBegin();
                  struct.fetch_row_stores = new java.util.ArrayList<java.lang.Boolean>(_list935.size);
                  boolean _elem936;
                  for (int _i937 = 0; _i937 < _list935.size; ++_i937)
                  {
                    _elem936 = iprot.readBool();
                    struct.fetch_row_stores.add(_elem936);
                  }
                  iprot.readListEnd();
                }
                struct.setFetchRowStoresIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 8: // GC_ID_MAP
              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                struct.gc_id_map = iprot.readBool();
                struct.setGcIdMapIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 9: // COLUMN_IDXS_LISTS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list938 = iprot.readListBegin();
                  struct.column_idxs_lists = new java.util.ArrayList<java.util.List<java.lang.Integer>>(_list938.size);
                  @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> _elem939;
                  for (int _i940 = 0; _i940 < _list938.size; ++_i940)
                  {
                    {
                      org.apache.thrift.protocol.TList _list941 = iprot.readListBegin();
                      _elem939 = new java.util.ArrayList<java.lang.Integer>(_list941.size);
                      int _elem942;
                      for (int _i943 = 0; _i943 < _list941.size; ++_i943)
                      {
                        _elem942 = iprot.readI32();
                        _elem939.add(_elem942);
                      }
                      iprot.readListEnd();
                    }
                    struct.column_idxs_lists.add(_elem939);
                  }
                  iprot.readListEnd();
                }
                struct.setColumnIdxsListsIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      } finally {
        iprot.decrementRecursionDepth();
      }
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.isSetTupleId()) {
        oprot.writeFieldBegin(TUPLE_ID_FIELD_DESC);
        oprot.writeI32(struct.tuple_id);
        oprot.writeFieldEnd();
      }
      if (struct.isSetIntermediateTupleId()) {
        oprot.writeFieldBegin(INTERMEDIATE_TUPLE_ID_FIELD_DESC);
        oprot.writeI32(struct.intermediate_tuple_id);
        oprot.writeFieldEnd();
      }
      if (struct.nodes_info != null) {
        if (struct.isSetNodesInfo()) {
          oprot.writeFieldBegin(NODES_INFO_FIELD_DESC);
          struct.nodes_info.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.fetch_expr_lists != null) {
        if (struct.isSetFetchExprLists()) {
          oprot.writeFieldBegin(FETCH_EXPR_LISTS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.fetch_expr_lists.size()));
            for (org.apache.doris.thrift.TExpr _iter944 : struct.fetch_expr_lists)
            {
              _iter944.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.column_descs_lists != null) {
        if (struct.isSetColumnDescsLists()) {
          oprot.writeFieldBegin(COLUMN_DESCS_LISTS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.column_descs_lists.size()));
            for (java.util.List<org.apache.doris.thrift.TColumn> _iter945 : struct.column_descs_lists)
            {
              {
                oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter945.size()));
                for (org.apache.doris.thrift.TColumn _iter946 : _iter945)
                {
                  _iter946.write(oprot);
                }
                oprot.writeListEnd();
              }
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.slot_locs_lists != null) {
        if (struct.isSetSlotLocsLists()) {
          oprot.writeFieldBegin(SLOT_LOCS_LISTS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.slot_locs_lists.size()));
            for (java.util.List<java.lang.Integer> _iter947 : struct.slot_locs_lists)
            {
              {
                oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, _iter947.size()));
                for (int _iter948 : _iter947)
                {
                  oprot.writeI32(_iter948);
                }
                oprot.writeListEnd();
              }
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.fetch_row_stores != null) {
        if (struct.isSetFetchRowStores()) {
          oprot.writeFieldBegin(FETCH_ROW_STORES_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BOOL, struct.fetch_row_stores.size()));
            for (boolean _iter949 : struct.fetch_row_stores)
            {
              oprot.writeBool(_iter949);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetGcIdMap()) {
        oprot.writeFieldBegin(GC_ID_MAP_FIELD_DESC);
        oprot.writeBool(struct.gc_id_map);
        oprot.writeFieldEnd();
      }
      if (struct.column_idxs_lists != null) {
        if (struct.isSetColumnIdxsLists()) {
          oprot.writeFieldBegin(COLUMN_IDXS_LISTS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.column_idxs_lists.size()));
            for (java.util.List<java.lang.Integer> _iter950 : struct.column_idxs_lists)
            {
              {
                oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, _iter950.size()));
                for (int _iter951 : _iter950)
                {
                  oprot.writeI32(_iter951);
                }
                oprot.writeListEnd();
              }
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class TMaterializationNodeTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    @Override
    public TMaterializationNodeTupleScheme getScheme() {
      return new TMaterializationNodeTupleScheme();
    }
  }

  private static class TMaterializationNodeTupleScheme extends org.apache.thrift.scheme.TupleScheme<TMaterializationNode> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TMaterializationNode struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetTupleId()) {
        optionals.set(0);
      }
      if (struct.isSetIntermediateTupleId()) {
        optionals.set(1);
      }
      if (struct.isSetNodesInfo()) {
        optionals.set(2);
      }
      if (struct.isSetFetchExprLists()) {
        optionals.set(3);
      }
      if (struct.isSetColumnDescsLists()) {
        optionals.set(4);
      }
      if (struct.isSetSlotLocsLists()) {
        optionals.set(5);
      }
      if (struct.isSetFetchRowStores()) {
        optionals.set(6);
      }
      if (struct.isSetGcIdMap()) {
        optionals.set(7);
      }
      if (struct.isSetColumnIdxsLists()) {
        optionals.set(8);
      }
      oprot.writeBitSet(optionals, 9);
      if (struct.isSetTupleId()) {
        oprot.writeI32(struct.tuple_id);
      }
      if (struct.isSetIntermediateTupleId()) {
        oprot.writeI32(struct.intermediate_tuple_id);
      }
      if (struct.isSetNodesInfo()) {
        struct.nodes_info.write(oprot);
      }
      if (struct.isSetFetchExprLists()) {
        {
          oprot.writeI32(struct.fetch_expr_lists.size());
          for (org.apache.doris.thrift.TExpr _iter952 : struct.fetch_expr_lists)
          {
            _iter952.write(oprot);
          }
        }
      }
      if (struct.isSetColumnDescsLists()) {
        {
          oprot.writeI32(struct.column_descs_lists.size());
          for (java.util.List<org.apache.doris.thrift.TColumn> _iter953 : struct.column_descs_lists)
          {
            {
              oprot.writeI32(_iter953.size());
              for (org.apache.doris.thrift.TColumn _iter954 : _iter953)
              {
                _iter954.write(oprot);
              }
            }
          }
        }
      }
      if (struct.isSetSlotLocsLists()) {
        {
          oprot.writeI32(struct.slot_locs_lists.size());
          for (java.util.List<java.lang.Integer> _iter955 : struct.slot_locs_lists)
          {
            {
              oprot.writeI32(_iter955.size());
              for (int _iter956 : _iter955)
              {
                oprot.writeI32(_iter956);
              }
            }
          }
        }
      }
      if (struct.isSetFetchRowStores()) {
        {
          oprot.writeI32(struct.fetch_row_stores.size());
          for (boolean _iter957 : struct.fetch_row_stores)
          {
            oprot.writeBool(_iter957);
          }
        }
      }
      if (struct.isSetGcIdMap()) {
        oprot.writeBool(struct.gc_id_map);
      }
      if (struct.isSetColumnIdxsLists()) {
        {
          oprot.writeI32(struct.column_idxs_lists.size());
          for (java.util.List<java.lang.Integer> _iter958 : struct.column_idxs_lists)
          {
            {
              oprot.writeI32(_iter958.size());
              for (int _iter959 : _iter958)
              {
                oprot.writeI32(_iter959);
              }
            }
          }
        }
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TMaterializationNode struct) throws org.apache.thrift.TException {
      prot.incrementRecursionDepth();
      try {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(9);
        if (incoming.get(0)) {
          struct.tuple_id = iprot.readI32();
          struct.setTupleIdIsSet(true);
        }
        if (incoming.get(1)) {
          struct.intermediate_tuple_id = iprot.readI32();
          struct.setIntermediateTupleIdIsSet(true);
        }
        if (incoming.get(2)) {
          struct.nodes_info = new org.apache.doris.thrift.TPaloNodesInfo();
          struct.nodes_info.read(iprot);
          struct.setNodesInfoIsSet(true);
        }
        if (incoming.get(3)) {
          {
            org.apache.thrift.protocol.TList _list960 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
            struct.fetch_expr_lists = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(_list960.size);
            @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr _elem961;
            for (int _i962 = 0; _i962 < _list960.size; ++_i962)
            {
              _elem961 = new org.apache.doris.thrift.TExpr();
              _elem961.read(iprot);
              struct.fetch_expr_lists.add(_elem961);
            }
          }
          struct.setFetchExprListsIsSet(true);
        }
        if (incoming.get(4)) {
          {
            org.apache.thrift.protocol.TList _list963 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST);
            struct.column_descs_lists = new java.util.ArrayList<java.util.List<org.apache.doris.thrift.TColumn>>(_list963.size);
            @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TColumn> _elem964;
            for (int _i965 = 0; _i965 < _list963.size; ++_i965)
            {
              {
                org.apache.thrift.protocol.TList _list966 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
                _elem964 = new java.util.ArrayList<org.apache.doris.thrift.TColumn>(_list966.size);
                @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TColumn _elem967;
                for (int _i968 = 0; _i968 < _list966.size; ++_i968)
                {
                  _elem967 = new org.apache.doris.thrift.TColumn();
                  _elem967.read(iprot);
                  _elem964.add(_elem967);
                }
              }
              struct.column_descs_lists.add(_elem964);
            }
          }
          struct.setColumnDescsListsIsSet(true);
        }
        if (incoming.get(5)) {
          {
            org.apache.thrift.protocol.TList _list969 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST);
            struct.slot_locs_lists = new java.util.ArrayList<java.util.List<java.lang.Integer>>(_list969.size);
            @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> _elem970;
            for (int _i971 = 0; _i971 < _list969.size; ++_i971)
            {
              {
                org.apache.thrift.protocol.TList _list972 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
                _elem970 = new java.util.ArrayList<java.lang.Integer>(_list972.size);
                int _elem973;
                for (int _i974 = 0; _i974 < _list972.size; ++_i974)
                {
                  _elem973 = iprot.readI32();
                  _elem970.add(_elem973);
                }
              }
              struct.slot_locs_lists.add(_elem970);
            }
          }
          struct.setSlotLocsListsIsSet(true);
        }
        if (incoming.get(6)) {
          {
            org.apache.thrift.protocol.TList _list975 = iprot.readListBegin(org.apache.thrift.protocol.TType.BOOL);
            struct.fetch_row_stores = new java.util.ArrayList<java.lang.Boolean>(_list975.size);
            boolean _elem976;
            for (int _i977 = 0; _i977 < _list975.size; ++_i977)
            {
              _elem976 = iprot.readBool();
              struct.fetch_row_stores.add(_elem976);
            }
          }
          struct.setFetchRowStoresIsSet(true);
        }
        if (incoming.get(7)) {
          struct.gc_id_map = iprot.readBool();
          struct.setGcIdMapIsSet(true);
        }
        if (incoming.get(8)) {
          {
            org.apache.thrift.protocol.TList _list978 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST);
            struct.column_idxs_lists = new java.util.ArrayList<java.util.List<java.lang.Integer>>(_list978.size);
            @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> _elem979;
            for (int _i980 = 0; _i980 < _list978.size; ++_i980)
            {
              {
                org.apache.thrift.protocol.TList _list981 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
                _elem979 = new java.util.ArrayList<java.lang.Integer>(_list981.size);
                int _elem982;
                for (int _i983 = 0; _i983 < _list981.size; ++_i983)
                {
                  _elem982 = iprot.readI32();
                  _elem979.add(_elem982);
                }
              }
              struct.column_idxs_lists.add(_elem979);
            }
          }
          struct.setColumnIdxsListsIsSet(true);
        }
      } finally {
        prot.decrementRecursionDepth();
      }
    }
  }

  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();
  }
}