TRepeatNode.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 TRepeatNode implements org.apache.thrift.TBase<TRepeatNode, TRepeatNode._Fields>, java.io.Serializable, Cloneable, Comparable<TRepeatNode> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRepeatNode");

  private static final org.apache.thrift.protocol.TField OUTPUT_TUPLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("output_tuple_id", org.apache.thrift.protocol.TType.I32, (short)1);
  private static final org.apache.thrift.protocol.TField SLOT_ID_SET_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("slot_id_set_list", org.apache.thrift.protocol.TType.LIST, (short)2);
  private static final org.apache.thrift.protocol.TField REPEAT_ID_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("repeat_id_list", org.apache.thrift.protocol.TType.LIST, (short)3);
  private static final org.apache.thrift.protocol.TField GROUPING_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("grouping_list", org.apache.thrift.protocol.TType.LIST, (short)4);
  private static final org.apache.thrift.protocol.TField ALL_SLOT_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("all_slot_ids", org.apache.thrift.protocol.TType.SET, (short)5);
  private static final org.apache.thrift.protocol.TField EXPRS_FIELD_DESC = new org.apache.thrift.protocol.TField("exprs", org.apache.thrift.protocol.TType.LIST, (short)6);

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

  public int output_tuple_id; // required
  public @org.apache.thrift.annotation.Nullable java.util.List<java.util.Set<java.lang.Integer>> slot_id_set_list; // required
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> repeat_id_list; // required
  public @org.apache.thrift.annotation.Nullable java.util.List<java.util.List<java.lang.Long>> grouping_list; // required
  public @org.apache.thrift.annotation.Nullable java.util.Set<java.lang.Integer> all_slot_ids; // required
  public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TExpr> exprs; // required

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    OUTPUT_TUPLE_ID((short)1, "output_tuple_id"),
    SLOT_ID_SET_LIST((short)2, "slot_id_set_list"),
    REPEAT_ID_LIST((short)3, "repeat_id_list"),
    GROUPING_LIST((short)4, "grouping_list"),
    ALL_SLOT_IDS((short)5, "all_slot_ids"),
    EXPRS((short)6, "exprs");

    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: // OUTPUT_TUPLE_ID
          return OUTPUT_TUPLE_ID;
        case 2: // SLOT_ID_SET_LIST
          return SLOT_ID_SET_LIST;
        case 3: // REPEAT_ID_LIST
          return REPEAT_ID_LIST;
        case 4: // GROUPING_LIST
          return GROUPING_LIST;
        case 5: // ALL_SLOT_IDS
          return ALL_SLOT_IDS;
        case 6: // EXPRS
          return EXPRS;
        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 __OUTPUT_TUPLE_ID_ISSET_ID = 0;
  private byte __isset_bitfield = 0;
  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.OUTPUT_TUPLE_ID, new org.apache.thrift.meta_data.FieldMetaData("output_tuple_id", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32        , "TTupleId")));
    tmpMap.put(_Fields.SLOT_ID_SET_LIST, new org.apache.thrift.meta_data.FieldMetaData("slot_id_set_list", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, 
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32                , "TSlotId")))));
    tmpMap.put(_Fields.REPEAT_ID_LIST, new org.apache.thrift.meta_data.FieldMetaData("repeat_id_list", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
    tmpMap.put(_Fields.GROUPING_LIST, new org.apache.thrift.meta_data.FieldMetaData("grouping_list", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        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.I64)))));
    tmpMap.put(_Fields.ALL_SLOT_IDS, new org.apache.thrift.meta_data.FieldMetaData("all_slot_ids", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32            , "TSlotId"))));
    tmpMap.put(_Fields.EXPRS, new org.apache.thrift.meta_data.FieldMetaData("exprs", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        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))));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TRepeatNode.class, metaDataMap);
  }

  public TRepeatNode() {
  }

  public TRepeatNode(
    int output_tuple_id,
    java.util.List<java.util.Set<java.lang.Integer>> slot_id_set_list,
    java.util.List<java.lang.Long> repeat_id_list,
    java.util.List<java.util.List<java.lang.Long>> grouping_list,
    java.util.Set<java.lang.Integer> all_slot_ids,
    java.util.List<org.apache.doris.thrift.TExpr> exprs)
  {
    this();
    this.output_tuple_id = output_tuple_id;
    setOutputTupleIdIsSet(true);
    this.slot_id_set_list = slot_id_set_list;
    this.repeat_id_list = repeat_id_list;
    this.grouping_list = grouping_list;
    this.all_slot_ids = all_slot_ids;
    this.exprs = exprs;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TRepeatNode(TRepeatNode other) {
    __isset_bitfield = other.__isset_bitfield;
    this.output_tuple_id = other.output_tuple_id;
    if (other.isSetSlotIdSetList()) {
      java.util.List<java.util.Set<java.lang.Integer>> __this__slot_id_set_list = new java.util.ArrayList<java.util.Set<java.lang.Integer>>(other.slot_id_set_list.size());
      for (java.util.Set<java.lang.Integer> other_element : other.slot_id_set_list) {
        java.util.Set<java.lang.Integer> __this__slot_id_set_list_copy = new java.util.HashSet<java.lang.Integer>(other_element.size());
        for (java.lang.Integer other_element_element : other_element) {
          __this__slot_id_set_list_copy.add(other_element_element);
        }
        __this__slot_id_set_list.add(__this__slot_id_set_list_copy);
      }
      this.slot_id_set_list = __this__slot_id_set_list;
    }
    if (other.isSetRepeatIdList()) {
      java.util.List<java.lang.Long> __this__repeat_id_list = new java.util.ArrayList<java.lang.Long>(other.repeat_id_list);
      this.repeat_id_list = __this__repeat_id_list;
    }
    if (other.isSetGroupingList()) {
      java.util.List<java.util.List<java.lang.Long>> __this__grouping_list = new java.util.ArrayList<java.util.List<java.lang.Long>>(other.grouping_list.size());
      for (java.util.List<java.lang.Long> other_element : other.grouping_list) {
        java.util.List<java.lang.Long> __this__grouping_list_copy = new java.util.ArrayList<java.lang.Long>(other_element);
        __this__grouping_list.add(__this__grouping_list_copy);
      }
      this.grouping_list = __this__grouping_list;
    }
    if (other.isSetAllSlotIds()) {
      java.util.Set<java.lang.Integer> __this__all_slot_ids = new java.util.HashSet<java.lang.Integer>(other.all_slot_ids.size());
      for (java.lang.Integer other_element : other.all_slot_ids) {
        __this__all_slot_ids.add(other_element);
      }
      this.all_slot_ids = __this__all_slot_ids;
    }
    if (other.isSetExprs()) {
      java.util.List<org.apache.doris.thrift.TExpr> __this__exprs = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(other.exprs.size());
      for (org.apache.doris.thrift.TExpr other_element : other.exprs) {
        __this__exprs.add(new org.apache.doris.thrift.TExpr(other_element));
      }
      this.exprs = __this__exprs;
    }
  }

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

  @Override
  public void clear() {
    setOutputTupleIdIsSet(false);
    this.output_tuple_id = 0;
    this.slot_id_set_list = null;
    this.repeat_id_list = null;
    this.grouping_list = null;
    this.all_slot_ids = null;
    this.exprs = null;
  }

  public int getOutputTupleId() {
    return this.output_tuple_id;
  }

  public TRepeatNode setOutputTupleId(int output_tuple_id) {
    this.output_tuple_id = output_tuple_id;
    setOutputTupleIdIsSet(true);
    return this;
  }

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

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

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

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

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

  public void addToSlotIdSetList(java.util.Set<java.lang.Integer> elem) {
    if (this.slot_id_set_list == null) {
      this.slot_id_set_list = new java.util.ArrayList<java.util.Set<java.lang.Integer>>();
    }
    this.slot_id_set_list.add(elem);
  }

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

  public TRepeatNode setSlotIdSetList(@org.apache.thrift.annotation.Nullable java.util.List<java.util.Set<java.lang.Integer>> slot_id_set_list) {
    this.slot_id_set_list = slot_id_set_list;
    return this;
  }

  public void unsetSlotIdSetList() {
    this.slot_id_set_list = null;
  }

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

  public void setSlotIdSetListIsSet(boolean value) {
    if (!value) {
      this.slot_id_set_list = null;
    }
  }

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

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

  public void addToRepeatIdList(long elem) {
    if (this.repeat_id_list == null) {
      this.repeat_id_list = new java.util.ArrayList<java.lang.Long>();
    }
    this.repeat_id_list.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<java.lang.Long> getRepeatIdList() {
    return this.repeat_id_list;
  }

  public TRepeatNode setRepeatIdList(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> repeat_id_list) {
    this.repeat_id_list = repeat_id_list;
    return this;
  }

  public void unsetRepeatIdList() {
    this.repeat_id_list = null;
  }

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

  public void setRepeatIdListIsSet(boolean value) {
    if (!value) {
      this.repeat_id_list = null;
    }
  }

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

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

  public void addToGroupingList(java.util.List<java.lang.Long> elem) {
    if (this.grouping_list == null) {
      this.grouping_list = new java.util.ArrayList<java.util.List<java.lang.Long>>();
    }
    this.grouping_list.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<java.util.List<java.lang.Long>> getGroupingList() {
    return this.grouping_list;
  }

  public TRepeatNode setGroupingList(@org.apache.thrift.annotation.Nullable java.util.List<java.util.List<java.lang.Long>> grouping_list) {
    this.grouping_list = grouping_list;
    return this;
  }

  public void unsetGroupingList() {
    this.grouping_list = null;
  }

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

  public void setGroupingListIsSet(boolean value) {
    if (!value) {
      this.grouping_list = null;
    }
  }

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

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

  public void addToAllSlotIds(int elem) {
    if (this.all_slot_ids == null) {
      this.all_slot_ids = new java.util.HashSet<java.lang.Integer>();
    }
    this.all_slot_ids.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Set<java.lang.Integer> getAllSlotIds() {
    return this.all_slot_ids;
  }

  public TRepeatNode setAllSlotIds(@org.apache.thrift.annotation.Nullable java.util.Set<java.lang.Integer> all_slot_ids) {
    this.all_slot_ids = all_slot_ids;
    return this;
  }

  public void unsetAllSlotIds() {
    this.all_slot_ids = null;
  }

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

  public void setAllSlotIdsIsSet(boolean value) {
    if (!value) {
      this.all_slot_ids = null;
    }
  }

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

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

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

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

  public TRepeatNode setExprs(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TExpr> exprs) {
    this.exprs = exprs;
    return this;
  }

  public void unsetExprs() {
    this.exprs = null;
  }

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

  public void setExprsIsSet(boolean value) {
    if (!value) {
      this.exprs = null;
    }
  }

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

    case SLOT_ID_SET_LIST:
      if (value == null) {
        unsetSlotIdSetList();
      } else {
        setSlotIdSetList((java.util.List<java.util.Set<java.lang.Integer>>)value);
      }
      break;

    case REPEAT_ID_LIST:
      if (value == null) {
        unsetRepeatIdList();
      } else {
        setRepeatIdList((java.util.List<java.lang.Long>)value);
      }
      break;

    case GROUPING_LIST:
      if (value == null) {
        unsetGroupingList();
      } else {
        setGroupingList((java.util.List<java.util.List<java.lang.Long>>)value);
      }
      break;

    case ALL_SLOT_IDS:
      if (value == null) {
        unsetAllSlotIds();
      } else {
        setAllSlotIds((java.util.Set<java.lang.Integer>)value);
      }
      break;

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

    }
  }

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

    case SLOT_ID_SET_LIST:
      return getSlotIdSetList();

    case REPEAT_ID_LIST:
      return getRepeatIdList();

    case GROUPING_LIST:
      return getGroupingList();

    case ALL_SLOT_IDS:
      return getAllSlotIds();

    case EXPRS:
      return getExprs();

    }
    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 OUTPUT_TUPLE_ID:
      return isSetOutputTupleId();
    case SLOT_ID_SET_LIST:
      return isSetSlotIdSetList();
    case REPEAT_ID_LIST:
      return isSetRepeatIdList();
    case GROUPING_LIST:
      return isSetGroupingList();
    case ALL_SLOT_IDS:
      return isSetAllSlotIds();
    case EXPRS:
      return isSetExprs();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_output_tuple_id = true;
    boolean that_present_output_tuple_id = true;
    if (this_present_output_tuple_id || that_present_output_tuple_id) {
      if (!(this_present_output_tuple_id && that_present_output_tuple_id))
        return false;
      if (this.output_tuple_id != that.output_tuple_id)
        return false;
    }

    boolean this_present_slot_id_set_list = true && this.isSetSlotIdSetList();
    boolean that_present_slot_id_set_list = true && that.isSetSlotIdSetList();
    if (this_present_slot_id_set_list || that_present_slot_id_set_list) {
      if (!(this_present_slot_id_set_list && that_present_slot_id_set_list))
        return false;
      if (!this.slot_id_set_list.equals(that.slot_id_set_list))
        return false;
    }

    boolean this_present_repeat_id_list = true && this.isSetRepeatIdList();
    boolean that_present_repeat_id_list = true && that.isSetRepeatIdList();
    if (this_present_repeat_id_list || that_present_repeat_id_list) {
      if (!(this_present_repeat_id_list && that_present_repeat_id_list))
        return false;
      if (!this.repeat_id_list.equals(that.repeat_id_list))
        return false;
    }

    boolean this_present_grouping_list = true && this.isSetGroupingList();
    boolean that_present_grouping_list = true && that.isSetGroupingList();
    if (this_present_grouping_list || that_present_grouping_list) {
      if (!(this_present_grouping_list && that_present_grouping_list))
        return false;
      if (!this.grouping_list.equals(that.grouping_list))
        return false;
    }

    boolean this_present_all_slot_ids = true && this.isSetAllSlotIds();
    boolean that_present_all_slot_ids = true && that.isSetAllSlotIds();
    if (this_present_all_slot_ids || that_present_all_slot_ids) {
      if (!(this_present_all_slot_ids && that_present_all_slot_ids))
        return false;
      if (!this.all_slot_ids.equals(that.all_slot_ids))
        return false;
    }

    boolean this_present_exprs = true && this.isSetExprs();
    boolean that_present_exprs = true && that.isSetExprs();
    if (this_present_exprs || that_present_exprs) {
      if (!(this_present_exprs && that_present_exprs))
        return false;
      if (!this.exprs.equals(that.exprs))
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + output_tuple_id;

    hashCode = hashCode * 8191 + ((isSetSlotIdSetList()) ? 131071 : 524287);
    if (isSetSlotIdSetList())
      hashCode = hashCode * 8191 + slot_id_set_list.hashCode();

    hashCode = hashCode * 8191 + ((isSetRepeatIdList()) ? 131071 : 524287);
    if (isSetRepeatIdList())
      hashCode = hashCode * 8191 + repeat_id_list.hashCode();

    hashCode = hashCode * 8191 + ((isSetGroupingList()) ? 131071 : 524287);
    if (isSetGroupingList())
      hashCode = hashCode * 8191 + grouping_list.hashCode();

    hashCode = hashCode * 8191 + ((isSetAllSlotIds()) ? 131071 : 524287);
    if (isSetAllSlotIds())
      hashCode = hashCode * 8191 + all_slot_ids.hashCode();

    hashCode = hashCode * 8191 + ((isSetExprs()) ? 131071 : 524287);
    if (isSetExprs())
      hashCode = hashCode * 8191 + exprs.hashCode();

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetOutputTupleId(), other.isSetOutputTupleId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOutputTupleId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.output_tuple_id, other.output_tuple_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSlotIdSetList(), other.isSetSlotIdSetList());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSlotIdSetList()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.slot_id_set_list, other.slot_id_set_list);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetRepeatIdList(), other.isSetRepeatIdList());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRepeatIdList()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.repeat_id_list, other.repeat_id_list);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetGroupingList(), other.isSetGroupingList());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetGroupingList()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grouping_list, other.grouping_list);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetAllSlotIds(), other.isSetAllSlotIds());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAllSlotIds()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.all_slot_ids, other.all_slot_ids);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetExprs(), other.isSetExprs());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetExprs()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.exprs, other.exprs);
      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("TRepeatNode(");
    boolean first = true;

    sb.append("output_tuple_id:");
    sb.append(this.output_tuple_id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("slot_id_set_list:");
    if (this.slot_id_set_list == null) {
      sb.append("null");
    } else {
      sb.append(this.slot_id_set_list);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("repeat_id_list:");
    if (this.repeat_id_list == null) {
      sb.append("null");
    } else {
      sb.append(this.repeat_id_list);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("grouping_list:");
    if (this.grouping_list == null) {
      sb.append("null");
    } else {
      sb.append(this.grouping_list);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("all_slot_ids:");
    if (this.all_slot_ids == null) {
      sb.append("null");
    } else {
      sb.append(this.all_slot_ids);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("exprs:");
    if (this.exprs == null) {
      sb.append("null");
    } else {
      sb.append(this.exprs);
    }
    first = false;
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // alas, we cannot check 'output_tuple_id' because it's a primitive and you chose the non-beans generator.
    if (slot_id_set_list == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'slot_id_set_list' was not present! Struct: " + toString());
    }
    if (repeat_id_list == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'repeat_id_list' was not present! Struct: " + toString());
    }
    if (grouping_list == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'grouping_list' was not present! Struct: " + toString());
    }
    if (all_slot_ids == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'all_slot_ids' was not present! Struct: " + toString());
    }
    if (exprs == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'exprs' was not present! Struct: " + toString());
    }
    // check for sub-struct validity
  }

  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
    try {
      // 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 TRepeatNodeStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TRepeatNodeStandardScheme getScheme() {
      return new TRepeatNodeStandardScheme();
    }
  }

  private static class TRepeatNodeStandardScheme extends org.apache.thrift.scheme.StandardScheme<TRepeatNode> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TRepeatNode 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: // OUTPUT_TUPLE_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.output_tuple_id = iprot.readI32();
              struct.setOutputTupleIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // SLOT_ID_SET_LIST
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list802 = iprot.readListBegin();
                struct.slot_id_set_list = new java.util.ArrayList<java.util.Set<java.lang.Integer>>(_list802.size);
                @org.apache.thrift.annotation.Nullable java.util.Set<java.lang.Integer> _elem803;
                for (int _i804 = 0; _i804 < _list802.size; ++_i804)
                {
                  {
                    org.apache.thrift.protocol.TSet _set805 = iprot.readSetBegin();
                    _elem803 = new java.util.HashSet<java.lang.Integer>(2*_set805.size);
                    int _elem806;
                    for (int _i807 = 0; _i807 < _set805.size; ++_i807)
                    {
                      _elem806 = iprot.readI32();
                      _elem803.add(_elem806);
                    }
                    iprot.readSetEnd();
                  }
                  struct.slot_id_set_list.add(_elem803);
                }
                iprot.readListEnd();
              }
              struct.setSlotIdSetListIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // REPEAT_ID_LIST
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list808 = iprot.readListBegin();
                struct.repeat_id_list = new java.util.ArrayList<java.lang.Long>(_list808.size);
                long _elem809;
                for (int _i810 = 0; _i810 < _list808.size; ++_i810)
                {
                  _elem809 = iprot.readI64();
                  struct.repeat_id_list.add(_elem809);
                }
                iprot.readListEnd();
              }
              struct.setRepeatIdListIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // GROUPING_LIST
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list811 = iprot.readListBegin();
                struct.grouping_list = new java.util.ArrayList<java.util.List<java.lang.Long>>(_list811.size);
                @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> _elem812;
                for (int _i813 = 0; _i813 < _list811.size; ++_i813)
                {
                  {
                    org.apache.thrift.protocol.TList _list814 = iprot.readListBegin();
                    _elem812 = new java.util.ArrayList<java.lang.Long>(_list814.size);
                    long _elem815;
                    for (int _i816 = 0; _i816 < _list814.size; ++_i816)
                    {
                      _elem815 = iprot.readI64();
                      _elem812.add(_elem815);
                    }
                    iprot.readListEnd();
                  }
                  struct.grouping_list.add(_elem812);
                }
                iprot.readListEnd();
              }
              struct.setGroupingListIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // ALL_SLOT_IDS
            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
              {
                org.apache.thrift.protocol.TSet _set817 = iprot.readSetBegin();
                struct.all_slot_ids = new java.util.HashSet<java.lang.Integer>(2*_set817.size);
                int _elem818;
                for (int _i819 = 0; _i819 < _set817.size; ++_i819)
                {
                  _elem818 = iprot.readI32();
                  struct.all_slot_ids.add(_elem818);
                }
                iprot.readSetEnd();
              }
              struct.setAllSlotIdsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // EXPRS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list820 = iprot.readListBegin();
                struct.exprs = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(_list820.size);
                @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr _elem821;
                for (int _i822 = 0; _i822 < _list820.size; ++_i822)
                {
                  _elem821 = new org.apache.doris.thrift.TExpr();
                  _elem821.read(iprot);
                  struct.exprs.add(_elem821);
                }
                iprot.readListEnd();
              }
              struct.setExprsIsSet(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.isSetOutputTupleId()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'output_tuple_id' was not found in serialized data! Struct: " + toString());
      }
      struct.validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(OUTPUT_TUPLE_ID_FIELD_DESC);
      oprot.writeI32(struct.output_tuple_id);
      oprot.writeFieldEnd();
      if (struct.slot_id_set_list != null) {
        oprot.writeFieldBegin(SLOT_ID_SET_LIST_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.SET, struct.slot_id_set_list.size()));
          for (java.util.Set<java.lang.Integer> _iter823 : struct.slot_id_set_list)
          {
            {
              oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, _iter823.size()));
              for (int _iter824 : _iter823)
              {
                oprot.writeI32(_iter824);
              }
              oprot.writeSetEnd();
            }
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.repeat_id_list != null) {
        oprot.writeFieldBegin(REPEAT_ID_LIST_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.repeat_id_list.size()));
          for (long _iter825 : struct.repeat_id_list)
          {
            oprot.writeI64(_iter825);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.grouping_list != null) {
        oprot.writeFieldBegin(GROUPING_LIST_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.grouping_list.size()));
          for (java.util.List<java.lang.Long> _iter826 : struct.grouping_list)
          {
            {
              oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, _iter826.size()));
              for (long _iter827 : _iter826)
              {
                oprot.writeI64(_iter827);
              }
              oprot.writeListEnd();
            }
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.all_slot_ids != null) {
        oprot.writeFieldBegin(ALL_SLOT_IDS_FIELD_DESC);
        {
          oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, struct.all_slot_ids.size()));
          for (int _iter828 : struct.all_slot_ids)
          {
            oprot.writeI32(_iter828);
          }
          oprot.writeSetEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.exprs != null) {
        oprot.writeFieldBegin(EXPRS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.exprs.size()));
          for (org.apache.doris.thrift.TExpr _iter829 : struct.exprs)
          {
            _iter829.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TRepeatNodeTupleScheme extends org.apache.thrift.scheme.TupleScheme<TRepeatNode> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TRepeatNode struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      oprot.writeI32(struct.output_tuple_id);
      {
        oprot.writeI32(struct.slot_id_set_list.size());
        for (java.util.Set<java.lang.Integer> _iter830 : struct.slot_id_set_list)
        {
          {
            oprot.writeI32(_iter830.size());
            for (int _iter831 : _iter830)
            {
              oprot.writeI32(_iter831);
            }
          }
        }
      }
      {
        oprot.writeI32(struct.repeat_id_list.size());
        for (long _iter832 : struct.repeat_id_list)
        {
          oprot.writeI64(_iter832);
        }
      }
      {
        oprot.writeI32(struct.grouping_list.size());
        for (java.util.List<java.lang.Long> _iter833 : struct.grouping_list)
        {
          {
            oprot.writeI32(_iter833.size());
            for (long _iter834 : _iter833)
            {
              oprot.writeI64(_iter834);
            }
          }
        }
      }
      {
        oprot.writeI32(struct.all_slot_ids.size());
        for (int _iter835 : struct.all_slot_ids)
        {
          oprot.writeI32(_iter835);
        }
      }
      {
        oprot.writeI32(struct.exprs.size());
        for (org.apache.doris.thrift.TExpr _iter836 : struct.exprs)
        {
          _iter836.write(oprot);
        }
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TRepeatNode struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.output_tuple_id = iprot.readI32();
      struct.setOutputTupleIdIsSet(true);
      {
        org.apache.thrift.protocol.TList _list837 = iprot.readListBegin(org.apache.thrift.protocol.TType.SET);
        struct.slot_id_set_list = new java.util.ArrayList<java.util.Set<java.lang.Integer>>(_list837.size);
        @org.apache.thrift.annotation.Nullable java.util.Set<java.lang.Integer> _elem838;
        for (int _i839 = 0; _i839 < _list837.size; ++_i839)
        {
          {
            org.apache.thrift.protocol.TSet _set840 = iprot.readSetBegin(org.apache.thrift.protocol.TType.I32);
            _elem838 = new java.util.HashSet<java.lang.Integer>(2*_set840.size);
            int _elem841;
            for (int _i842 = 0; _i842 < _set840.size; ++_i842)
            {
              _elem841 = iprot.readI32();
              _elem838.add(_elem841);
            }
          }
          struct.slot_id_set_list.add(_elem838);
        }
      }
      struct.setSlotIdSetListIsSet(true);
      {
        org.apache.thrift.protocol.TList _list843 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
        struct.repeat_id_list = new java.util.ArrayList<java.lang.Long>(_list843.size);
        long _elem844;
        for (int _i845 = 0; _i845 < _list843.size; ++_i845)
        {
          _elem844 = iprot.readI64();
          struct.repeat_id_list.add(_elem844);
        }
      }
      struct.setRepeatIdListIsSet(true);
      {
        org.apache.thrift.protocol.TList _list846 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST);
        struct.grouping_list = new java.util.ArrayList<java.util.List<java.lang.Long>>(_list846.size);
        @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> _elem847;
        for (int _i848 = 0; _i848 < _list846.size; ++_i848)
        {
          {
            org.apache.thrift.protocol.TList _list849 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
            _elem847 = new java.util.ArrayList<java.lang.Long>(_list849.size);
            long _elem850;
            for (int _i851 = 0; _i851 < _list849.size; ++_i851)
            {
              _elem850 = iprot.readI64();
              _elem847.add(_elem850);
            }
          }
          struct.grouping_list.add(_elem847);
        }
      }
      struct.setGroupingListIsSet(true);
      {
        org.apache.thrift.protocol.TSet _set852 = iprot.readSetBegin(org.apache.thrift.protocol.TType.I32);
        struct.all_slot_ids = new java.util.HashSet<java.lang.Integer>(2*_set852.size);
        int _elem853;
        for (int _i854 = 0; _i854 < _set852.size; ++_i854)
        {
          _elem853 = iprot.readI32();
          struct.all_slot_ids.add(_elem853);
        }
      }
      struct.setAllSlotIdsIsSet(true);
      {
        org.apache.thrift.protocol.TList _list855 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
        struct.exprs = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(_list855.size);
        @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr _elem856;
        for (int _i857 = 0; _i857 < _list855.size; ++_i857)
        {
          _elem856 = new org.apache.doris.thrift.TExpr();
          _elem856.read(iprot);
          struct.exprs.add(_elem856);
        }
      }
      struct.setExprsIsSet(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();
  }
}