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

  private static final org.apache.thrift.protocol.TField TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("table_id", org.apache.thrift.protocol.TType.I64, (short)1);
  private static final org.apache.thrift.protocol.TField INDEX_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("index_id", org.apache.thrift.protocol.TType.I64, (short)2);
  private static final org.apache.thrift.protocol.TField IS_PREAGGREGATION_FIELD_DESC = new org.apache.thrift.protocol.TField("is_preaggregation", org.apache.thrift.protocol.TType.BOOL, (short)3);
  private static final org.apache.thrift.protocol.TField KEY_COLUMN_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("key_column_names", org.apache.thrift.protocol.TType.LIST, (short)4);
  private static final org.apache.thrift.protocol.TField KEY_COLUMN_TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("key_column_types", org.apache.thrift.protocol.TType.LIST, (short)5);
  private static final org.apache.thrift.protocol.TField ROLLUP_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("rollup_name", org.apache.thrift.protocol.TType.STRING, (short)6);
  private static final org.apache.thrift.protocol.TField SORT_COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("sort_column", org.apache.thrift.protocol.TType.STRING, (short)7);
  private static final org.apache.thrift.protocol.TField SELECT_COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("select_columns", org.apache.thrift.protocol.TType.LIST, (short)8);

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

  public long table_id; // optional
  public long index_id; // optional
  public boolean is_preaggregation; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> key_column_names; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TPrimitiveType> key_column_types; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String rollup_name; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String sort_column; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> select_columns; // 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 {
    TABLE_ID((short)1, "table_id"),
    INDEX_ID((short)2, "index_id"),
    IS_PREAGGREGATION((short)3, "is_preaggregation"),
    KEY_COLUMN_NAMES((short)4, "key_column_names"),
    KEY_COLUMN_TYPES((short)5, "key_column_types"),
    ROLLUP_NAME((short)6, "rollup_name"),
    SORT_COLUMN((short)7, "sort_column"),
    SELECT_COLUMNS((short)8, "select_columns");

    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: // TABLE_ID
          return TABLE_ID;
        case 2: // INDEX_ID
          return INDEX_ID;
        case 3: // IS_PREAGGREGATION
          return IS_PREAGGREGATION;
        case 4: // KEY_COLUMN_NAMES
          return KEY_COLUMN_NAMES;
        case 5: // KEY_COLUMN_TYPES
          return KEY_COLUMN_TYPES;
        case 6: // ROLLUP_NAME
          return ROLLUP_NAME;
        case 7: // SORT_COLUMN
          return SORT_COLUMN;
        case 8: // SELECT_COLUMNS
          return SELECT_COLUMNS;
        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 __TABLE_ID_ISSET_ID = 0;
  private static final int __INDEX_ID_ISSET_ID = 1;
  private static final int __IS_PREAGGREGATION_ISSET_ID = 2;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.TABLE_ID,_Fields.INDEX_ID,_Fields.IS_PREAGGREGATION,_Fields.KEY_COLUMN_NAMES,_Fields.KEY_COLUMN_TYPES,_Fields.ROLLUP_NAME,_Fields.SORT_COLUMN,_Fields.SELECT_COLUMNS};
  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.TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("table_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.INDEX_ID, new org.apache.thrift.meta_data.FieldMetaData("index_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.IS_PREAGGREGATION, new org.apache.thrift.meta_data.FieldMetaData("is_preaggregation", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.KEY_COLUMN_NAMES, new org.apache.thrift.meta_data.FieldMetaData("key_column_names", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.KEY_COLUMN_TYPES, new org.apache.thrift.meta_data.FieldMetaData("key_column_types", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.doris.thrift.TPrimitiveType.class))));
    tmpMap.put(_Fields.ROLLUP_NAME, new org.apache.thrift.meta_data.FieldMetaData("rollup_name", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.SORT_COLUMN, new org.apache.thrift.meta_data.FieldMetaData("sort_column", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.SELECT_COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("select_columns", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TNormalizedOlapScanNode.class, metaDataMap);
  }

  public TNormalizedOlapScanNode() {
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TNormalizedOlapScanNode(TNormalizedOlapScanNode other) {
    __isset_bitfield = other.__isset_bitfield;
    this.table_id = other.table_id;
    this.index_id = other.index_id;
    this.is_preaggregation = other.is_preaggregation;
    if (other.isSetKeyColumnNames()) {
      java.util.List<java.lang.String> __this__key_column_names = new java.util.ArrayList<java.lang.String>(other.key_column_names);
      this.key_column_names = __this__key_column_names;
    }
    if (other.isSetKeyColumnTypes()) {
      java.util.List<org.apache.doris.thrift.TPrimitiveType> __this__key_column_types = new java.util.ArrayList<org.apache.doris.thrift.TPrimitiveType>(other.key_column_types.size());
      for (org.apache.doris.thrift.TPrimitiveType other_element : other.key_column_types) {
        __this__key_column_types.add(other_element);
      }
      this.key_column_types = __this__key_column_types;
    }
    if (other.isSetRollupName()) {
      this.rollup_name = other.rollup_name;
    }
    if (other.isSetSortColumn()) {
      this.sort_column = other.sort_column;
    }
    if (other.isSetSelectColumns()) {
      java.util.List<java.lang.String> __this__select_columns = new java.util.ArrayList<java.lang.String>(other.select_columns);
      this.select_columns = __this__select_columns;
    }
  }

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

  @Override
  public void clear() {
    setTableIdIsSet(false);
    this.table_id = 0;
    setIndexIdIsSet(false);
    this.index_id = 0;
    setIsPreaggregationIsSet(false);
    this.is_preaggregation = false;
    this.key_column_names = null;
    this.key_column_types = null;
    this.rollup_name = null;
    this.sort_column = null;
    this.select_columns = null;
  }

  public long getTableId() {
    return this.table_id;
  }

  public TNormalizedOlapScanNode setTableId(long table_id) {
    this.table_id = table_id;
    setTableIdIsSet(true);
    return this;
  }

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

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

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

  public long getIndexId() {
    return this.index_id;
  }

  public TNormalizedOlapScanNode setIndexId(long index_id) {
    this.index_id = index_id;
    setIndexIdIsSet(true);
    return this;
  }

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

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

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

  public boolean isIsPreaggregation() {
    return this.is_preaggregation;
  }

  public TNormalizedOlapScanNode setIsPreaggregation(boolean is_preaggregation) {
    this.is_preaggregation = is_preaggregation;
    setIsPreaggregationIsSet(true);
    return this;
  }

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

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

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

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

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

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

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

  public TNormalizedOlapScanNode setKeyColumnNames(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> key_column_names) {
    this.key_column_names = key_column_names;
    return this;
  }

  public void unsetKeyColumnNames() {
    this.key_column_names = null;
  }

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

  public void setKeyColumnNamesIsSet(boolean value) {
    if (!value) {
      this.key_column_names = null;
    }
  }

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

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

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

  @org.apache.thrift.annotation.Nullable
  public java.util.List<org.apache.doris.thrift.TPrimitiveType> getKeyColumnTypes() {
    return this.key_column_types;
  }

  public TNormalizedOlapScanNode setKeyColumnTypes(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TPrimitiveType> key_column_types) {
    this.key_column_types = key_column_types;
    return this;
  }

  public void unsetKeyColumnTypes() {
    this.key_column_types = null;
  }

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

  public void setKeyColumnTypesIsSet(boolean value) {
    if (!value) {
      this.key_column_types = null;
    }
  }

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

  public TNormalizedOlapScanNode setRollupName(@org.apache.thrift.annotation.Nullable java.lang.String rollup_name) {
    this.rollup_name = rollup_name;
    return this;
  }

  public void unsetRollupName() {
    this.rollup_name = null;
  }

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

  public void setRollupNameIsSet(boolean value) {
    if (!value) {
      this.rollup_name = null;
    }
  }

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

  public TNormalizedOlapScanNode setSortColumn(@org.apache.thrift.annotation.Nullable java.lang.String sort_column) {
    this.sort_column = sort_column;
    return this;
  }

  public void unsetSortColumn() {
    this.sort_column = null;
  }

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

  public void setSortColumnIsSet(boolean value) {
    if (!value) {
      this.sort_column = null;
    }
  }

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

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

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

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

  public TNormalizedOlapScanNode setSelectColumns(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> select_columns) {
    this.select_columns = select_columns;
    return this;
  }

  public void unsetSelectColumns() {
    this.select_columns = null;
  }

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

  public void setSelectColumnsIsSet(boolean value) {
    if (!value) {
      this.select_columns = null;
    }
  }

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case TABLE_ID:
      if (value == null) {
        unsetTableId();
      } else {
        setTableId((java.lang.Long)value);
      }
      break;

    case INDEX_ID:
      if (value == null) {
        unsetIndexId();
      } else {
        setIndexId((java.lang.Long)value);
      }
      break;

    case IS_PREAGGREGATION:
      if (value == null) {
        unsetIsPreaggregation();
      } else {
        setIsPreaggregation((java.lang.Boolean)value);
      }
      break;

    case KEY_COLUMN_NAMES:
      if (value == null) {
        unsetKeyColumnNames();
      } else {
        setKeyColumnNames((java.util.List<java.lang.String>)value);
      }
      break;

    case KEY_COLUMN_TYPES:
      if (value == null) {
        unsetKeyColumnTypes();
      } else {
        setKeyColumnTypes((java.util.List<org.apache.doris.thrift.TPrimitiveType>)value);
      }
      break;

    case ROLLUP_NAME:
      if (value == null) {
        unsetRollupName();
      } else {
        setRollupName((java.lang.String)value);
      }
      break;

    case SORT_COLUMN:
      if (value == null) {
        unsetSortColumn();
      } else {
        setSortColumn((java.lang.String)value);
      }
      break;

    case SELECT_COLUMNS:
      if (value == null) {
        unsetSelectColumns();
      } else {
        setSelectColumns((java.util.List<java.lang.String>)value);
      }
      break;

    }
  }

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

    case INDEX_ID:
      return getIndexId();

    case IS_PREAGGREGATION:
      return isIsPreaggregation();

    case KEY_COLUMN_NAMES:
      return getKeyColumnNames();

    case KEY_COLUMN_TYPES:
      return getKeyColumnTypes();

    case ROLLUP_NAME:
      return getRollupName();

    case SORT_COLUMN:
      return getSortColumn();

    case SELECT_COLUMNS:
      return getSelectColumns();

    }
    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 TABLE_ID:
      return isSetTableId();
    case INDEX_ID:
      return isSetIndexId();
    case IS_PREAGGREGATION:
      return isSetIsPreaggregation();
    case KEY_COLUMN_NAMES:
      return isSetKeyColumnNames();
    case KEY_COLUMN_TYPES:
      return isSetKeyColumnTypes();
    case ROLLUP_NAME:
      return isSetRollupName();
    case SORT_COLUMN:
      return isSetSortColumn();
    case SELECT_COLUMNS:
      return isSetSelectColumns();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_table_id = true && this.isSetTableId();
    boolean that_present_table_id = true && that.isSetTableId();
    if (this_present_table_id || that_present_table_id) {
      if (!(this_present_table_id && that_present_table_id))
        return false;
      if (this.table_id != that.table_id)
        return false;
    }

    boolean this_present_index_id = true && this.isSetIndexId();
    boolean that_present_index_id = true && that.isSetIndexId();
    if (this_present_index_id || that_present_index_id) {
      if (!(this_present_index_id && that_present_index_id))
        return false;
      if (this.index_id != that.index_id)
        return false;
    }

    boolean this_present_is_preaggregation = true && this.isSetIsPreaggregation();
    boolean that_present_is_preaggregation = true && that.isSetIsPreaggregation();
    if (this_present_is_preaggregation || that_present_is_preaggregation) {
      if (!(this_present_is_preaggregation && that_present_is_preaggregation))
        return false;
      if (this.is_preaggregation != that.is_preaggregation)
        return false;
    }

    boolean this_present_key_column_names = true && this.isSetKeyColumnNames();
    boolean that_present_key_column_names = true && that.isSetKeyColumnNames();
    if (this_present_key_column_names || that_present_key_column_names) {
      if (!(this_present_key_column_names && that_present_key_column_names))
        return false;
      if (!this.key_column_names.equals(that.key_column_names))
        return false;
    }

    boolean this_present_key_column_types = true && this.isSetKeyColumnTypes();
    boolean that_present_key_column_types = true && that.isSetKeyColumnTypes();
    if (this_present_key_column_types || that_present_key_column_types) {
      if (!(this_present_key_column_types && that_present_key_column_types))
        return false;
      if (!this.key_column_types.equals(that.key_column_types))
        return false;
    }

    boolean this_present_rollup_name = true && this.isSetRollupName();
    boolean that_present_rollup_name = true && that.isSetRollupName();
    if (this_present_rollup_name || that_present_rollup_name) {
      if (!(this_present_rollup_name && that_present_rollup_name))
        return false;
      if (!this.rollup_name.equals(that.rollup_name))
        return false;
    }

    boolean this_present_sort_column = true && this.isSetSortColumn();
    boolean that_present_sort_column = true && that.isSetSortColumn();
    if (this_present_sort_column || that_present_sort_column) {
      if (!(this_present_sort_column && that_present_sort_column))
        return false;
      if (!this.sort_column.equals(that.sort_column))
        return false;
    }

    boolean this_present_select_columns = true && this.isSetSelectColumns();
    boolean that_present_select_columns = true && that.isSetSelectColumns();
    if (this_present_select_columns || that_present_select_columns) {
      if (!(this_present_select_columns && that_present_select_columns))
        return false;
      if (!this.select_columns.equals(that.select_columns))
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetTableId()) ? 131071 : 524287);
    if (isSetTableId())
      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(table_id);

    hashCode = hashCode * 8191 + ((isSetIndexId()) ? 131071 : 524287);
    if (isSetIndexId())
      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(index_id);

    hashCode = hashCode * 8191 + ((isSetIsPreaggregation()) ? 131071 : 524287);
    if (isSetIsPreaggregation())
      hashCode = hashCode * 8191 + ((is_preaggregation) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetKeyColumnNames()) ? 131071 : 524287);
    if (isSetKeyColumnNames())
      hashCode = hashCode * 8191 + key_column_names.hashCode();

    hashCode = hashCode * 8191 + ((isSetKeyColumnTypes()) ? 131071 : 524287);
    if (isSetKeyColumnTypes())
      hashCode = hashCode * 8191 + key_column_types.hashCode();

    hashCode = hashCode * 8191 + ((isSetRollupName()) ? 131071 : 524287);
    if (isSetRollupName())
      hashCode = hashCode * 8191 + rollup_name.hashCode();

    hashCode = hashCode * 8191 + ((isSetSortColumn()) ? 131071 : 524287);
    if (isSetSortColumn())
      hashCode = hashCode * 8191 + sort_column.hashCode();

    hashCode = hashCode * 8191 + ((isSetSelectColumns()) ? 131071 : 524287);
    if (isSetSelectColumns())
      hashCode = hashCode * 8191 + select_columns.hashCode();

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetTableId(), other.isSetTableId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTableId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_id, other.table_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIndexId(), other.isSetIndexId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIndexId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_id, other.index_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIsPreaggregation(), other.isSetIsPreaggregation());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsPreaggregation()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_preaggregation, other.is_preaggregation);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetKeyColumnNames(), other.isSetKeyColumnNames());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetKeyColumnNames()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key_column_names, other.key_column_names);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetKeyColumnTypes(), other.isSetKeyColumnTypes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetKeyColumnTypes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key_column_types, other.key_column_types);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetRollupName(), other.isSetRollupName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRollupName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rollup_name, other.rollup_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSortColumn(), other.isSetSortColumn());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSortColumn()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sort_column, other.sort_column);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSelectColumns(), other.isSetSelectColumns());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSelectColumns()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.select_columns, other.select_columns);
      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("TNormalizedOlapScanNode(");
    boolean first = true;

    if (isSetTableId()) {
      sb.append("table_id:");
      sb.append(this.table_id);
      first = false;
    }
    if (isSetIndexId()) {
      if (!first) sb.append(", ");
      sb.append("index_id:");
      sb.append(this.index_id);
      first = false;
    }
    if (isSetIsPreaggregation()) {
      if (!first) sb.append(", ");
      sb.append("is_preaggregation:");
      sb.append(this.is_preaggregation);
      first = false;
    }
    if (isSetKeyColumnNames()) {
      if (!first) sb.append(", ");
      sb.append("key_column_names:");
      if (this.key_column_names == null) {
        sb.append("null");
      } else {
        sb.append(this.key_column_names);
      }
      first = false;
    }
    if (isSetKeyColumnTypes()) {
      if (!first) sb.append(", ");
      sb.append("key_column_types:");
      if (this.key_column_types == null) {
        sb.append("null");
      } else {
        sb.append(this.key_column_types);
      }
      first = false;
    }
    if (isSetRollupName()) {
      if (!first) sb.append(", ");
      sb.append("rollup_name:");
      if (this.rollup_name == null) {
        sb.append("null");
      } else {
        sb.append(this.rollup_name);
      }
      first = false;
    }
    if (isSetSortColumn()) {
      if (!first) sb.append(", ");
      sb.append("sort_column:");
      if (this.sort_column == null) {
        sb.append("null");
      } else {
        sb.append(this.sort_column);
      }
      first = false;
    }
    if (isSetSelectColumns()) {
      if (!first) sb.append(", ");
      sb.append("select_columns:");
      if (this.select_columns == null) {
        sb.append("null");
      } else {
        sb.append(this.select_columns);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // 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 TNormalizedOlapScanNodeStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TNormalizedOlapScanNodeStandardScheme getScheme() {
      return new TNormalizedOlapScanNodeStandardScheme();
    }
  }

  private static class TNormalizedOlapScanNodeStandardScheme extends org.apache.thrift.scheme.StandardScheme<TNormalizedOlapScanNode> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TNormalizedOlapScanNode 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: // TABLE_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.table_id = iprot.readI64();
              struct.setTableIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // INDEX_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.index_id = iprot.readI64();
              struct.setIndexIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // IS_PREAGGREGATION
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.is_preaggregation = iprot.readBool();
              struct.setIsPreaggregationIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // KEY_COLUMN_NAMES
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
                struct.key_column_names = new java.util.ArrayList<java.lang.String>(_list0.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _elem1;
                for (int _i2 = 0; _i2 < _list0.size; ++_i2)
                {
                  _elem1 = iprot.readString();
                  struct.key_column_names.add(_elem1);
                }
                iprot.readListEnd();
              }
              struct.setKeyColumnNamesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // KEY_COLUMN_TYPES
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
                struct.key_column_types = new java.util.ArrayList<org.apache.doris.thrift.TPrimitiveType>(_list3.size);
                @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TPrimitiveType _elem4;
                for (int _i5 = 0; _i5 < _list3.size; ++_i5)
                {
                  _elem4 = org.apache.doris.thrift.TPrimitiveType.findByValue(iprot.readI32());
                  if (_elem4 != null)
                  {
                    struct.key_column_types.add(_elem4);
                  }
                }
                iprot.readListEnd();
              }
              struct.setKeyColumnTypesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // ROLLUP_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.rollup_name = iprot.readString();
              struct.setRollupNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // SORT_COLUMN
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.sort_column = iprot.readString();
              struct.setSortColumnIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // SELECT_COLUMNS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list6 = iprot.readListBegin();
                struct.select_columns = new java.util.ArrayList<java.lang.String>(_list6.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _elem7;
                for (int _i8 = 0; _i8 < _list6.size; ++_i8)
                {
                  _elem7 = iprot.readString();
                  struct.select_columns.add(_elem7);
                }
                iprot.readListEnd();
              }
              struct.setSelectColumnsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

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

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.isSetTableId()) {
        oprot.writeFieldBegin(TABLE_ID_FIELD_DESC);
        oprot.writeI64(struct.table_id);
        oprot.writeFieldEnd();
      }
      if (struct.isSetIndexId()) {
        oprot.writeFieldBegin(INDEX_ID_FIELD_DESC);
        oprot.writeI64(struct.index_id);
        oprot.writeFieldEnd();
      }
      if (struct.isSetIsPreaggregation()) {
        oprot.writeFieldBegin(IS_PREAGGREGATION_FIELD_DESC);
        oprot.writeBool(struct.is_preaggregation);
        oprot.writeFieldEnd();
      }
      if (struct.key_column_names != null) {
        if (struct.isSetKeyColumnNames()) {
          oprot.writeFieldBegin(KEY_COLUMN_NAMES_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.key_column_names.size()));
            for (java.lang.String _iter9 : struct.key_column_names)
            {
              oprot.writeString(_iter9);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.key_column_types != null) {
        if (struct.isSetKeyColumnTypes()) {
          oprot.writeFieldBegin(KEY_COLUMN_TYPES_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.key_column_types.size()));
            for (org.apache.doris.thrift.TPrimitiveType _iter10 : struct.key_column_types)
            {
              oprot.writeI32(_iter10.getValue());
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.rollup_name != null) {
        if (struct.isSetRollupName()) {
          oprot.writeFieldBegin(ROLLUP_NAME_FIELD_DESC);
          oprot.writeString(struct.rollup_name);
          oprot.writeFieldEnd();
        }
      }
      if (struct.sort_column != null) {
        if (struct.isSetSortColumn()) {
          oprot.writeFieldBegin(SORT_COLUMN_FIELD_DESC);
          oprot.writeString(struct.sort_column);
          oprot.writeFieldEnd();
        }
      }
      if (struct.select_columns != null) {
        if (struct.isSetSelectColumns()) {
          oprot.writeFieldBegin(SELECT_COLUMNS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.select_columns.size()));
            for (java.lang.String _iter11 : struct.select_columns)
            {
              oprot.writeString(_iter11);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TNormalizedOlapScanNodeTupleScheme extends org.apache.thrift.scheme.TupleScheme<TNormalizedOlapScanNode> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TNormalizedOlapScanNode 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.isSetTableId()) {
        optionals.set(0);
      }
      if (struct.isSetIndexId()) {
        optionals.set(1);
      }
      if (struct.isSetIsPreaggregation()) {
        optionals.set(2);
      }
      if (struct.isSetKeyColumnNames()) {
        optionals.set(3);
      }
      if (struct.isSetKeyColumnTypes()) {
        optionals.set(4);
      }
      if (struct.isSetRollupName()) {
        optionals.set(5);
      }
      if (struct.isSetSortColumn()) {
        optionals.set(6);
      }
      if (struct.isSetSelectColumns()) {
        optionals.set(7);
      }
      oprot.writeBitSet(optionals, 8);
      if (struct.isSetTableId()) {
        oprot.writeI64(struct.table_id);
      }
      if (struct.isSetIndexId()) {
        oprot.writeI64(struct.index_id);
      }
      if (struct.isSetIsPreaggregation()) {
        oprot.writeBool(struct.is_preaggregation);
      }
      if (struct.isSetKeyColumnNames()) {
        {
          oprot.writeI32(struct.key_column_names.size());
          for (java.lang.String _iter12 : struct.key_column_names)
          {
            oprot.writeString(_iter12);
          }
        }
      }
      if (struct.isSetKeyColumnTypes()) {
        {
          oprot.writeI32(struct.key_column_types.size());
          for (org.apache.doris.thrift.TPrimitiveType _iter13 : struct.key_column_types)
          {
            oprot.writeI32(_iter13.getValue());
          }
        }
      }
      if (struct.isSetRollupName()) {
        oprot.writeString(struct.rollup_name);
      }
      if (struct.isSetSortColumn()) {
        oprot.writeString(struct.sort_column);
      }
      if (struct.isSetSelectColumns()) {
        {
          oprot.writeI32(struct.select_columns.size());
          for (java.lang.String _iter14 : struct.select_columns)
          {
            oprot.writeString(_iter14);
          }
        }
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TNormalizedOlapScanNode struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet incoming = iprot.readBitSet(8);
      if (incoming.get(0)) {
        struct.table_id = iprot.readI64();
        struct.setTableIdIsSet(true);
      }
      if (incoming.get(1)) {
        struct.index_id = iprot.readI64();
        struct.setIndexIdIsSet(true);
      }
      if (incoming.get(2)) {
        struct.is_preaggregation = iprot.readBool();
        struct.setIsPreaggregationIsSet(true);
      }
      if (incoming.get(3)) {
        {
          org.apache.thrift.protocol.TList _list15 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
          struct.key_column_names = new java.util.ArrayList<java.lang.String>(_list15.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _elem16;
          for (int _i17 = 0; _i17 < _list15.size; ++_i17)
          {
            _elem16 = iprot.readString();
            struct.key_column_names.add(_elem16);
          }
        }
        struct.setKeyColumnNamesIsSet(true);
      }
      if (incoming.get(4)) {
        {
          org.apache.thrift.protocol.TList _list18 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
          struct.key_column_types = new java.util.ArrayList<org.apache.doris.thrift.TPrimitiveType>(_list18.size);
          @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TPrimitiveType _elem19;
          for (int _i20 = 0; _i20 < _list18.size; ++_i20)
          {
            _elem19 = org.apache.doris.thrift.TPrimitiveType.findByValue(iprot.readI32());
            if (_elem19 != null)
            {
              struct.key_column_types.add(_elem19);
            }
          }
        }
        struct.setKeyColumnTypesIsSet(true);
      }
      if (incoming.get(5)) {
        struct.rollup_name = iprot.readString();
        struct.setRollupNameIsSet(true);
      }
      if (incoming.get(6)) {
        struct.sort_column = iprot.readString();
        struct.setSortColumnIsSet(true);
      }
      if (incoming.get(7)) {
        {
          org.apache.thrift.protocol.TList _list21 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
          struct.select_columns = new java.util.ArrayList<java.lang.String>(_list21.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _elem22;
          for (int _i23 = 0; _i23 < _list21.size; ++_i23)
          {
            _elem22 = iprot.readString();
            struct.select_columns.add(_elem22);
          }
        }
        struct.setSelectColumnsIsSet(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();
  }
}