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

  private static final org.apache.thrift.protocol.TField TUPLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tuple_id", org.apache.thrift.protocol.TType.I32, (short)1);
  private static final org.apache.thrift.protocol.TField KEY_COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("key_column_name", org.apache.thrift.protocol.TType.LIST, (short)2);
  private static final org.apache.thrift.protocol.TField KEY_COLUMN_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("key_column_type", org.apache.thrift.protocol.TType.LIST, (short)3);
  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)4);
  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)5);
  private static final org.apache.thrift.protocol.TField KEY_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("keyType", org.apache.thrift.protocol.TType.I32, (short)6);
  private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)7);
  private static final org.apache.thrift.protocol.TField COLUMNS_DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("columns_desc", org.apache.thrift.protocol.TType.LIST, (short)8);
  private static final org.apache.thrift.protocol.TField SORT_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("sort_info", org.apache.thrift.protocol.TType.STRUCT, (short)9);
  private static final org.apache.thrift.protocol.TField SORT_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("sort_limit", org.apache.thrift.protocol.TType.I64, (short)10);
  private static final org.apache.thrift.protocol.TField ENABLE_UNIQUE_KEY_MERGE_ON_WRITE_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_unique_key_merge_on_write", org.apache.thrift.protocol.TType.BOOL, (short)11);
  private static final org.apache.thrift.protocol.TField PUSH_DOWN_AGG_TYPE_OPT_FIELD_DESC = new org.apache.thrift.protocol.TField("push_down_agg_type_opt", org.apache.thrift.protocol.TType.I32, (short)12);
  private static final org.apache.thrift.protocol.TField USE_TOPN_OPT_FIELD_DESC = new org.apache.thrift.protocol.TField("use_topn_opt", org.apache.thrift.protocol.TType.BOOL, (short)13);
  private static final org.apache.thrift.protocol.TField INDEXES_DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("indexes_desc", org.apache.thrift.protocol.TType.LIST, (short)14);
  private static final org.apache.thrift.protocol.TField OUTPUT_COLUMN_UNIQUE_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("output_column_unique_ids", org.apache.thrift.protocol.TType.SET, (short)15);
  private static final org.apache.thrift.protocol.TField DISTRIBUTE_COLUMN_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("distribute_column_ids", org.apache.thrift.protocol.TType.LIST, (short)16);
  private static final org.apache.thrift.protocol.TField SCHEMA_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("schema_version", org.apache.thrift.protocol.TType.I32, (short)17);
  private static final org.apache.thrift.protocol.TField TOPN_FILTER_SOURCE_NODE_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("topn_filter_source_node_ids", org.apache.thrift.protocol.TType.LIST, (short)18);
  private static final org.apache.thrift.protocol.TField SCORE_SORT_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("score_sort_info", org.apache.thrift.protocol.TType.STRUCT, (short)19);
  private static final org.apache.thrift.protocol.TField SCORE_SORT_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("score_sort_limit", org.apache.thrift.protocol.TType.I64, (short)20);
  private static final org.apache.thrift.protocol.TField ANN_SORT_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("ann_sort_info", org.apache.thrift.protocol.TType.STRUCT, (short)21);
  private static final org.apache.thrift.protocol.TField ANN_SORT_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("ann_sort_limit", org.apache.thrift.protocol.TType.I64, (short)22);
  private static final org.apache.thrift.protocol.TField SCORE_RANGE_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("score_range_info", org.apache.thrift.protocol.TType.STRUCT, (short)23);
  private static final org.apache.thrift.protocol.TField ENABLE_MOR_VALUE_PREDICATE_PUSHDOWN_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_mor_value_predicate_pushdown", org.apache.thrift.protocol.TType.BOOL, (short)24);
  private static final org.apache.thrift.protocol.TField READ_MOR_AS_DUP_FIELD_DESC = new org.apache.thrift.protocol.TField("read_mor_as_dup", org.apache.thrift.protocol.TType.BOOL, (short)25);

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

  public int tuple_id; // required
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> key_column_name; // required
  public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TPrimitiveType> key_column_type; // required
  public boolean is_preaggregation; // required
  public @org.apache.thrift.annotation.Nullable java.lang.String sort_column; // optional
  /**
   * 
   * @see org.apache.doris.thrift.TKeysType
   */
  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TKeysType keyType; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String table_name; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TColumn> columns_desc; // optional
  public @org.apache.thrift.annotation.Nullable TSortInfo sort_info; // optional
  public long sort_limit; // optional
  public boolean enable_unique_key_merge_on_write; // optional
  /**
   * 
   * @see TPushAggOp
   */
  public @org.apache.thrift.annotation.Nullable TPushAggOp push_down_agg_type_opt; // optional
  public boolean use_topn_opt; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TOlapTableIndex> indexes_desc; // optional
  public @org.apache.thrift.annotation.Nullable java.util.Set<java.lang.Integer> output_column_unique_ids; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> distribute_column_ids; // optional
  public int schema_version; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> topn_filter_source_node_ids; // optional
  public @org.apache.thrift.annotation.Nullable TSortInfo score_sort_info; // optional
  public long score_sort_limit; // optional
  public @org.apache.thrift.annotation.Nullable TSortInfo ann_sort_info; // optional
  public long ann_sort_limit; // optional
  public @org.apache.thrift.annotation.Nullable TScoreRangeInfo score_range_info; // optional
  public boolean enable_mor_value_predicate_pushdown; // optional
  public boolean read_mor_as_dup; // optional

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    TUPLE_ID((short)1, "tuple_id"),
    KEY_COLUMN_NAME((short)2, "key_column_name"),
    KEY_COLUMN_TYPE((short)3, "key_column_type"),
    IS_PREAGGREGATION((short)4, "is_preaggregation"),
    SORT_COLUMN((short)5, "sort_column"),
    /**
     * 
     * @see org.apache.doris.thrift.TKeysType
     */
    KEY_TYPE((short)6, "keyType"),
    TABLE_NAME((short)7, "table_name"),
    COLUMNS_DESC((short)8, "columns_desc"),
    SORT_INFO((short)9, "sort_info"),
    SORT_LIMIT((short)10, "sort_limit"),
    ENABLE_UNIQUE_KEY_MERGE_ON_WRITE((short)11, "enable_unique_key_merge_on_write"),
    /**
     * 
     * @see TPushAggOp
     */
    PUSH_DOWN_AGG_TYPE_OPT((short)12, "push_down_agg_type_opt"),
    USE_TOPN_OPT((short)13, "use_topn_opt"),
    INDEXES_DESC((short)14, "indexes_desc"),
    OUTPUT_COLUMN_UNIQUE_IDS((short)15, "output_column_unique_ids"),
    DISTRIBUTE_COLUMN_IDS((short)16, "distribute_column_ids"),
    SCHEMA_VERSION((short)17, "schema_version"),
    TOPN_FILTER_SOURCE_NODE_IDS((short)18, "topn_filter_source_node_ids"),
    SCORE_SORT_INFO((short)19, "score_sort_info"),
    SCORE_SORT_LIMIT((short)20, "score_sort_limit"),
    ANN_SORT_INFO((short)21, "ann_sort_info"),
    ANN_SORT_LIMIT((short)22, "ann_sort_limit"),
    SCORE_RANGE_INFO((short)23, "score_range_info"),
    ENABLE_MOR_VALUE_PREDICATE_PUSHDOWN((short)24, "enable_mor_value_predicate_pushdown"),
    READ_MOR_AS_DUP((short)25, "read_mor_as_dup");

    private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

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

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    @org.apache.thrift.annotation.Nullable
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // TUPLE_ID
          return TUPLE_ID;
        case 2: // KEY_COLUMN_NAME
          return KEY_COLUMN_NAME;
        case 3: // KEY_COLUMN_TYPE
          return KEY_COLUMN_TYPE;
        case 4: // IS_PREAGGREGATION
          return IS_PREAGGREGATION;
        case 5: // SORT_COLUMN
          return SORT_COLUMN;
        case 6: // KEY_TYPE
          return KEY_TYPE;
        case 7: // TABLE_NAME
          return TABLE_NAME;
        case 8: // COLUMNS_DESC
          return COLUMNS_DESC;
        case 9: // SORT_INFO
          return SORT_INFO;
        case 10: // SORT_LIMIT
          return SORT_LIMIT;
        case 11: // ENABLE_UNIQUE_KEY_MERGE_ON_WRITE
          return ENABLE_UNIQUE_KEY_MERGE_ON_WRITE;
        case 12: // PUSH_DOWN_AGG_TYPE_OPT
          return PUSH_DOWN_AGG_TYPE_OPT;
        case 13: // USE_TOPN_OPT
          return USE_TOPN_OPT;
        case 14: // INDEXES_DESC
          return INDEXES_DESC;
        case 15: // OUTPUT_COLUMN_UNIQUE_IDS
          return OUTPUT_COLUMN_UNIQUE_IDS;
        case 16: // DISTRIBUTE_COLUMN_IDS
          return DISTRIBUTE_COLUMN_IDS;
        case 17: // SCHEMA_VERSION
          return SCHEMA_VERSION;
        case 18: // TOPN_FILTER_SOURCE_NODE_IDS
          return TOPN_FILTER_SOURCE_NODE_IDS;
        case 19: // SCORE_SORT_INFO
          return SCORE_SORT_INFO;
        case 20: // SCORE_SORT_LIMIT
          return SCORE_SORT_LIMIT;
        case 21: // ANN_SORT_INFO
          return ANN_SORT_INFO;
        case 22: // ANN_SORT_LIMIT
          return ANN_SORT_LIMIT;
        case 23: // SCORE_RANGE_INFO
          return SCORE_RANGE_INFO;
        case 24: // ENABLE_MOR_VALUE_PREDICATE_PUSHDOWN
          return ENABLE_MOR_VALUE_PREDICATE_PUSHDOWN;
        case 25: // READ_MOR_AS_DUP
          return READ_MOR_AS_DUP;
        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 __TUPLE_ID_ISSET_ID = 0;
  private static final int __IS_PREAGGREGATION_ISSET_ID = 1;
  private static final int __SORT_LIMIT_ISSET_ID = 2;
  private static final int __ENABLE_UNIQUE_KEY_MERGE_ON_WRITE_ISSET_ID = 3;
  private static final int __USE_TOPN_OPT_ISSET_ID = 4;
  private static final int __SCHEMA_VERSION_ISSET_ID = 5;
  private static final int __SCORE_SORT_LIMIT_ISSET_ID = 6;
  private static final int __ANN_SORT_LIMIT_ISSET_ID = 7;
  private static final int __ENABLE_MOR_VALUE_PREDICATE_PUSHDOWN_ISSET_ID = 8;
  private static final int __READ_MOR_AS_DUP_ISSET_ID = 9;
  private short __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.SORT_COLUMN,_Fields.KEY_TYPE,_Fields.TABLE_NAME,_Fields.COLUMNS_DESC,_Fields.SORT_INFO,_Fields.SORT_LIMIT,_Fields.ENABLE_UNIQUE_KEY_MERGE_ON_WRITE,_Fields.PUSH_DOWN_AGG_TYPE_OPT,_Fields.USE_TOPN_OPT,_Fields.INDEXES_DESC,_Fields.OUTPUT_COLUMN_UNIQUE_IDS,_Fields.DISTRIBUTE_COLUMN_IDS,_Fields.SCHEMA_VERSION,_Fields.TOPN_FILTER_SOURCE_NODE_IDS,_Fields.SCORE_SORT_INFO,_Fields.SCORE_SORT_LIMIT,_Fields.ANN_SORT_INFO,_Fields.ANN_SORT_LIMIT,_Fields.SCORE_RANGE_INFO,_Fields.ENABLE_MOR_VALUE_PREDICATE_PUSHDOWN,_Fields.READ_MOR_AS_DUP};
  public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.TUPLE_ID, new org.apache.thrift.meta_data.FieldMetaData("tuple_id", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32        , "TTupleId")));
    tmpMap.put(_Fields.KEY_COLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("key_column_name", 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.STRING))));
    tmpMap.put(_Fields.KEY_COLUMN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("key_column_type", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        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.IS_PREAGGREGATION, new org.apache.thrift.meta_data.FieldMetaData("is_preaggregation", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    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.KEY_TYPE, new org.apache.thrift.meta_data.FieldMetaData("keyType", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.doris.thrift.TKeysType.class)));
    tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.COLUMNS_DESC, new org.apache.thrift.meta_data.FieldMetaData("columns_desc", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TColumn.class))));
    tmpMap.put(_Fields.SORT_INFO, new org.apache.thrift.meta_data.FieldMetaData("sort_info", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSortInfo.class)));
    tmpMap.put(_Fields.SORT_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("sort_limit", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.ENABLE_UNIQUE_KEY_MERGE_ON_WRITE, new org.apache.thrift.meta_data.FieldMetaData("enable_unique_key_merge_on_write", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.PUSH_DOWN_AGG_TYPE_OPT, new org.apache.thrift.meta_data.FieldMetaData("push_down_agg_type_opt", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TPushAggOp.class)));
    tmpMap.put(_Fields.USE_TOPN_OPT, new org.apache.thrift.meta_data.FieldMetaData("use_topn_opt", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.INDEXES_DESC, new org.apache.thrift.meta_data.FieldMetaData("indexes_desc", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TOlapTableIndex.class))));
    tmpMap.put(_Fields.OUTPUT_COLUMN_UNIQUE_IDS, new org.apache.thrift.meta_data.FieldMetaData("output_column_unique_ids", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        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))));
    tmpMap.put(_Fields.DISTRIBUTE_COLUMN_IDS, new org.apache.thrift.meta_data.FieldMetaData("distribute_column_ids", 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.I32))));
    tmpMap.put(_Fields.SCHEMA_VERSION, new org.apache.thrift.meta_data.FieldMetaData("schema_version", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.TOPN_FILTER_SOURCE_NODE_IDS, new org.apache.thrift.meta_data.FieldMetaData("topn_filter_source_node_ids", 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.I32))));
    tmpMap.put(_Fields.SCORE_SORT_INFO, new org.apache.thrift.meta_data.FieldMetaData("score_sort_info", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSortInfo.class)));
    tmpMap.put(_Fields.SCORE_SORT_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("score_sort_limit", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.ANN_SORT_INFO, new org.apache.thrift.meta_data.FieldMetaData("ann_sort_info", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSortInfo.class)));
    tmpMap.put(_Fields.ANN_SORT_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("ann_sort_limit", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.SCORE_RANGE_INFO, new org.apache.thrift.meta_data.FieldMetaData("score_range_info", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TScoreRangeInfo.class)));
    tmpMap.put(_Fields.ENABLE_MOR_VALUE_PREDICATE_PUSHDOWN, new org.apache.thrift.meta_data.FieldMetaData("enable_mor_value_predicate_pushdown", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.READ_MOR_AS_DUP, new org.apache.thrift.meta_data.FieldMetaData("read_mor_as_dup", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TOlapScanNode.class, metaDataMap);
  }

  public TOlapScanNode() {
  }

  public TOlapScanNode(
    int tuple_id,
    java.util.List<java.lang.String> key_column_name,
    java.util.List<org.apache.doris.thrift.TPrimitiveType> key_column_type,
    boolean is_preaggregation)
  {
    this();
    this.tuple_id = tuple_id;
    setTupleIdIsSet(true);
    this.key_column_name = key_column_name;
    this.key_column_type = key_column_type;
    this.is_preaggregation = is_preaggregation;
    setIsPreaggregationIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TOlapScanNode(TOlapScanNode other) {
    __isset_bitfield = other.__isset_bitfield;
    this.tuple_id = other.tuple_id;
    if (other.isSetKeyColumnName()) {
      java.util.List<java.lang.String> __this__key_column_name = new java.util.ArrayList<java.lang.String>(other.key_column_name);
      this.key_column_name = __this__key_column_name;
    }
    if (other.isSetKeyColumnType()) {
      java.util.List<org.apache.doris.thrift.TPrimitiveType> __this__key_column_type = new java.util.ArrayList<org.apache.doris.thrift.TPrimitiveType>(other.key_column_type.size());
      for (org.apache.doris.thrift.TPrimitiveType other_element : other.key_column_type) {
        __this__key_column_type.add(other_element);
      }
      this.key_column_type = __this__key_column_type;
    }
    this.is_preaggregation = other.is_preaggregation;
    if (other.isSetSortColumn()) {
      this.sort_column = other.sort_column;
    }
    if (other.isSetKeyType()) {
      this.keyType = other.keyType;
    }
    if (other.isSetTableName()) {
      this.table_name = other.table_name;
    }
    if (other.isSetColumnsDesc()) {
      java.util.List<org.apache.doris.thrift.TColumn> __this__columns_desc = new java.util.ArrayList<org.apache.doris.thrift.TColumn>(other.columns_desc.size());
      for (org.apache.doris.thrift.TColumn other_element : other.columns_desc) {
        __this__columns_desc.add(new org.apache.doris.thrift.TColumn(other_element));
      }
      this.columns_desc = __this__columns_desc;
    }
    if (other.isSetSortInfo()) {
      this.sort_info = new TSortInfo(other.sort_info);
    }
    this.sort_limit = other.sort_limit;
    this.enable_unique_key_merge_on_write = other.enable_unique_key_merge_on_write;
    if (other.isSetPushDownAggTypeOpt()) {
      this.push_down_agg_type_opt = other.push_down_agg_type_opt;
    }
    this.use_topn_opt = other.use_topn_opt;
    if (other.isSetIndexesDesc()) {
      java.util.List<org.apache.doris.thrift.TOlapTableIndex> __this__indexes_desc = new java.util.ArrayList<org.apache.doris.thrift.TOlapTableIndex>(other.indexes_desc.size());
      for (org.apache.doris.thrift.TOlapTableIndex other_element : other.indexes_desc) {
        __this__indexes_desc.add(new org.apache.doris.thrift.TOlapTableIndex(other_element));
      }
      this.indexes_desc = __this__indexes_desc;
    }
    if (other.isSetOutputColumnUniqueIds()) {
      java.util.Set<java.lang.Integer> __this__output_column_unique_ids = new java.util.HashSet<java.lang.Integer>(other.output_column_unique_ids);
      this.output_column_unique_ids = __this__output_column_unique_ids;
    }
    if (other.isSetDistributeColumnIds()) {
      java.util.List<java.lang.Integer> __this__distribute_column_ids = new java.util.ArrayList<java.lang.Integer>(other.distribute_column_ids);
      this.distribute_column_ids = __this__distribute_column_ids;
    }
    this.schema_version = other.schema_version;
    if (other.isSetTopnFilterSourceNodeIds()) {
      java.util.List<java.lang.Integer> __this__topn_filter_source_node_ids = new java.util.ArrayList<java.lang.Integer>(other.topn_filter_source_node_ids);
      this.topn_filter_source_node_ids = __this__topn_filter_source_node_ids;
    }
    if (other.isSetScoreSortInfo()) {
      this.score_sort_info = new TSortInfo(other.score_sort_info);
    }
    this.score_sort_limit = other.score_sort_limit;
    if (other.isSetAnnSortInfo()) {
      this.ann_sort_info = new TSortInfo(other.ann_sort_info);
    }
    this.ann_sort_limit = other.ann_sort_limit;
    if (other.isSetScoreRangeInfo()) {
      this.score_range_info = new TScoreRangeInfo(other.score_range_info);
    }
    this.enable_mor_value_predicate_pushdown = other.enable_mor_value_predicate_pushdown;
    this.read_mor_as_dup = other.read_mor_as_dup;
  }

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

  @Override
  public void clear() {
    setTupleIdIsSet(false);
    this.tuple_id = 0;
    this.key_column_name = null;
    this.key_column_type = null;
    setIsPreaggregationIsSet(false);
    this.is_preaggregation = false;
    this.sort_column = null;
    this.keyType = null;
    this.table_name = null;
    this.columns_desc = null;
    this.sort_info = null;
    setSortLimitIsSet(false);
    this.sort_limit = 0;
    setEnableUniqueKeyMergeOnWriteIsSet(false);
    this.enable_unique_key_merge_on_write = false;
    this.push_down_agg_type_opt = null;
    setUseTopnOptIsSet(false);
    this.use_topn_opt = false;
    this.indexes_desc = null;
    this.output_column_unique_ids = null;
    this.distribute_column_ids = null;
    setSchemaVersionIsSet(false);
    this.schema_version = 0;
    this.topn_filter_source_node_ids = null;
    this.score_sort_info = null;
    setScoreSortLimitIsSet(false);
    this.score_sort_limit = 0;
    this.ann_sort_info = null;
    setAnnSortLimitIsSet(false);
    this.ann_sort_limit = 0;
    this.score_range_info = null;
    setEnableMorValuePredicatePushdownIsSet(false);
    this.enable_mor_value_predicate_pushdown = false;
    setReadMorAsDupIsSet(false);
    this.read_mor_as_dup = false;
  }

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

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

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

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

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

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

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

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

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

  public TOlapScanNode setKeyColumnName(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> key_column_name) {
    this.key_column_name = key_column_name;
    return this;
  }

  public void unsetKeyColumnName() {
    this.key_column_name = null;
  }

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

  public void setKeyColumnNameIsSet(boolean value) {
    if (!value) {
      this.key_column_name = null;
    }
  }

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

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

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

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

  public TOlapScanNode setKeyColumnType(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TPrimitiveType> key_column_type) {
    this.key_column_type = key_column_type;
    return this;
  }

  public void unsetKeyColumnType() {
    this.key_column_type = null;
  }

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

  public void setKeyColumnTypeIsSet(boolean value) {
    if (!value) {
      this.key_column_type = null;
    }
  }

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

  public TOlapScanNode 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);
  }

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

  public TOlapScanNode 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;
    }
  }

  /**
   * 
   * @see org.apache.doris.thrift.TKeysType
   */
  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TKeysType getKeyType() {
    return this.keyType;
  }

  /**
   * 
   * @see org.apache.doris.thrift.TKeysType
   */
  public TOlapScanNode setKeyType(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TKeysType keyType) {
    this.keyType = keyType;
    return this;
  }

  public void unsetKeyType() {
    this.keyType = null;
  }

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

  public void setKeyTypeIsSet(boolean value) {
    if (!value) {
      this.keyType = null;
    }
  }

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

  public TOlapScanNode setTableName(@org.apache.thrift.annotation.Nullable java.lang.String table_name) {
    this.table_name = table_name;
    return this;
  }

  public void unsetTableName() {
    this.table_name = null;
  }

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

  public void setTableNameIsSet(boolean value) {
    if (!value) {
      this.table_name = null;
    }
  }

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

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

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

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

  public TOlapScanNode setColumnsDesc(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TColumn> columns_desc) {
    this.columns_desc = columns_desc;
    return this;
  }

  public void unsetColumnsDesc() {
    this.columns_desc = null;
  }

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

  public void setColumnsDescIsSet(boolean value) {
    if (!value) {
      this.columns_desc = null;
    }
  }

  @org.apache.thrift.annotation.Nullable
  public TSortInfo getSortInfo() {
    return this.sort_info;
  }

  public TOlapScanNode setSortInfo(@org.apache.thrift.annotation.Nullable TSortInfo sort_info) {
    this.sort_info = sort_info;
    return this;
  }

  public void unsetSortInfo() {
    this.sort_info = null;
  }

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

  public void setSortInfoIsSet(boolean value) {
    if (!value) {
      this.sort_info = null;
    }
  }

  public long getSortLimit() {
    return this.sort_limit;
  }

  public TOlapScanNode setSortLimit(long sort_limit) {
    this.sort_limit = sort_limit;
    setSortLimitIsSet(true);
    return this;
  }

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

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

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

  public boolean isEnableUniqueKeyMergeOnWrite() {
    return this.enable_unique_key_merge_on_write;
  }

  public TOlapScanNode setEnableUniqueKeyMergeOnWrite(boolean enable_unique_key_merge_on_write) {
    this.enable_unique_key_merge_on_write = enable_unique_key_merge_on_write;
    setEnableUniqueKeyMergeOnWriteIsSet(true);
    return this;
  }

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

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

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

  /**
   * 
   * @see TPushAggOp
   */
  @org.apache.thrift.annotation.Nullable
  public TPushAggOp getPushDownAggTypeOpt() {
    return this.push_down_agg_type_opt;
  }

  /**
   * 
   * @see TPushAggOp
   */
  public TOlapScanNode setPushDownAggTypeOpt(@org.apache.thrift.annotation.Nullable TPushAggOp push_down_agg_type_opt) {
    this.push_down_agg_type_opt = push_down_agg_type_opt;
    return this;
  }

  public void unsetPushDownAggTypeOpt() {
    this.push_down_agg_type_opt = null;
  }

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

  public void setPushDownAggTypeOptIsSet(boolean value) {
    if (!value) {
      this.push_down_agg_type_opt = null;
    }
  }

  public boolean isUseTopnOpt() {
    return this.use_topn_opt;
  }

  public TOlapScanNode setUseTopnOpt(boolean use_topn_opt) {
    this.use_topn_opt = use_topn_opt;
    setUseTopnOptIsSet(true);
    return this;
  }

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

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

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

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

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

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

  @org.apache.thrift.annotation.Nullable
  public java.util.List<org.apache.doris.thrift.TOlapTableIndex> getIndexesDesc() {
    return this.indexes_desc;
  }

  public TOlapScanNode setIndexesDesc(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TOlapTableIndex> indexes_desc) {
    this.indexes_desc = indexes_desc;
    return this;
  }

  public void unsetIndexesDesc() {
    this.indexes_desc = null;
  }

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

  public void setIndexesDescIsSet(boolean value) {
    if (!value) {
      this.indexes_desc = null;
    }
  }

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

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

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

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

  public TOlapScanNode setOutputColumnUniqueIds(@org.apache.thrift.annotation.Nullable java.util.Set<java.lang.Integer> output_column_unique_ids) {
    this.output_column_unique_ids = output_column_unique_ids;
    return this;
  }

  public void unsetOutputColumnUniqueIds() {
    this.output_column_unique_ids = null;
  }

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

  public void setOutputColumnUniqueIdsIsSet(boolean value) {
    if (!value) {
      this.output_column_unique_ids = null;
    }
  }

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

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

  public void addToDistributeColumnIds(int elem) {
    if (this.distribute_column_ids == null) {
      this.distribute_column_ids = new java.util.ArrayList<java.lang.Integer>();
    }
    this.distribute_column_ids.add(elem);
  }

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

  public TOlapScanNode setDistributeColumnIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> distribute_column_ids) {
    this.distribute_column_ids = distribute_column_ids;
    return this;
  }

  public void unsetDistributeColumnIds() {
    this.distribute_column_ids = null;
  }

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

  public void setDistributeColumnIdsIsSet(boolean value) {
    if (!value) {
      this.distribute_column_ids = null;
    }
  }

  public int getSchemaVersion() {
    return this.schema_version;
  }

  public TOlapScanNode setSchemaVersion(int schema_version) {
    this.schema_version = schema_version;
    setSchemaVersionIsSet(true);
    return this;
  }

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

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

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

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

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

  public void addToTopnFilterSourceNodeIds(int elem) {
    if (this.topn_filter_source_node_ids == null) {
      this.topn_filter_source_node_ids = new java.util.ArrayList<java.lang.Integer>();
    }
    this.topn_filter_source_node_ids.add(elem);
  }

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

  public TOlapScanNode setTopnFilterSourceNodeIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> topn_filter_source_node_ids) {
    this.topn_filter_source_node_ids = topn_filter_source_node_ids;
    return this;
  }

  public void unsetTopnFilterSourceNodeIds() {
    this.topn_filter_source_node_ids = null;
  }

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

  public void setTopnFilterSourceNodeIdsIsSet(boolean value) {
    if (!value) {
      this.topn_filter_source_node_ids = null;
    }
  }

  @org.apache.thrift.annotation.Nullable
  public TSortInfo getScoreSortInfo() {
    return this.score_sort_info;
  }

  public TOlapScanNode setScoreSortInfo(@org.apache.thrift.annotation.Nullable TSortInfo score_sort_info) {
    this.score_sort_info = score_sort_info;
    return this;
  }

  public void unsetScoreSortInfo() {
    this.score_sort_info = null;
  }

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

  public void setScoreSortInfoIsSet(boolean value) {
    if (!value) {
      this.score_sort_info = null;
    }
  }

  public long getScoreSortLimit() {
    return this.score_sort_limit;
  }

  public TOlapScanNode setScoreSortLimit(long score_sort_limit) {
    this.score_sort_limit = score_sort_limit;
    setScoreSortLimitIsSet(true);
    return this;
  }

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

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

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

  @org.apache.thrift.annotation.Nullable
  public TSortInfo getAnnSortInfo() {
    return this.ann_sort_info;
  }

  public TOlapScanNode setAnnSortInfo(@org.apache.thrift.annotation.Nullable TSortInfo ann_sort_info) {
    this.ann_sort_info = ann_sort_info;
    return this;
  }

  public void unsetAnnSortInfo() {
    this.ann_sort_info = null;
  }

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

  public void setAnnSortInfoIsSet(boolean value) {
    if (!value) {
      this.ann_sort_info = null;
    }
  }

  public long getAnnSortLimit() {
    return this.ann_sort_limit;
  }

  public TOlapScanNode setAnnSortLimit(long ann_sort_limit) {
    this.ann_sort_limit = ann_sort_limit;
    setAnnSortLimitIsSet(true);
    return this;
  }

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

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

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

  @org.apache.thrift.annotation.Nullable
  public TScoreRangeInfo getScoreRangeInfo() {
    return this.score_range_info;
  }

  public TOlapScanNode setScoreRangeInfo(@org.apache.thrift.annotation.Nullable TScoreRangeInfo score_range_info) {
    this.score_range_info = score_range_info;
    return this;
  }

  public void unsetScoreRangeInfo() {
    this.score_range_info = null;
  }

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

  public void setScoreRangeInfoIsSet(boolean value) {
    if (!value) {
      this.score_range_info = null;
    }
  }

  public boolean isEnableMorValuePredicatePushdown() {
    return this.enable_mor_value_predicate_pushdown;
  }

  public TOlapScanNode setEnableMorValuePredicatePushdown(boolean enable_mor_value_predicate_pushdown) {
    this.enable_mor_value_predicate_pushdown = enable_mor_value_predicate_pushdown;
    setEnableMorValuePredicatePushdownIsSet(true);
    return this;
  }

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

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

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

  public boolean isReadMorAsDup() {
    return this.read_mor_as_dup;
  }

  public TOlapScanNode setReadMorAsDup(boolean read_mor_as_dup) {
    this.read_mor_as_dup = read_mor_as_dup;
    setReadMorAsDupIsSet(true);
    return this;
  }

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

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

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

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

    case KEY_COLUMN_NAME:
      if (value == null) {
        unsetKeyColumnName();
      } else {
        setKeyColumnName((java.util.List<java.lang.String>)value);
      }
      break;

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

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

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

    case KEY_TYPE:
      if (value == null) {
        unsetKeyType();
      } else {
        setKeyType((org.apache.doris.thrift.TKeysType)value);
      }
      break;

    case TABLE_NAME:
      if (value == null) {
        unsetTableName();
      } else {
        setTableName((java.lang.String)value);
      }
      break;

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

    case SORT_INFO:
      if (value == null) {
        unsetSortInfo();
      } else {
        setSortInfo((TSortInfo)value);
      }
      break;

    case SORT_LIMIT:
      if (value == null) {
        unsetSortLimit();
      } else {
        setSortLimit((java.lang.Long)value);
      }
      break;

    case ENABLE_UNIQUE_KEY_MERGE_ON_WRITE:
      if (value == null) {
        unsetEnableUniqueKeyMergeOnWrite();
      } else {
        setEnableUniqueKeyMergeOnWrite((java.lang.Boolean)value);
      }
      break;

    case PUSH_DOWN_AGG_TYPE_OPT:
      if (value == null) {
        unsetPushDownAggTypeOpt();
      } else {
        setPushDownAggTypeOpt((TPushAggOp)value);
      }
      break;

    case USE_TOPN_OPT:
      if (value == null) {
        unsetUseTopnOpt();
      } else {
        setUseTopnOpt((java.lang.Boolean)value);
      }
      break;

    case INDEXES_DESC:
      if (value == null) {
        unsetIndexesDesc();
      } else {
        setIndexesDesc((java.util.List<org.apache.doris.thrift.TOlapTableIndex>)value);
      }
      break;

    case OUTPUT_COLUMN_UNIQUE_IDS:
      if (value == null) {
        unsetOutputColumnUniqueIds();
      } else {
        setOutputColumnUniqueIds((java.util.Set<java.lang.Integer>)value);
      }
      break;

    case DISTRIBUTE_COLUMN_IDS:
      if (value == null) {
        unsetDistributeColumnIds();
      } else {
        setDistributeColumnIds((java.util.List<java.lang.Integer>)value);
      }
      break;

    case SCHEMA_VERSION:
      if (value == null) {
        unsetSchemaVersion();
      } else {
        setSchemaVersion((java.lang.Integer)value);
      }
      break;

    case TOPN_FILTER_SOURCE_NODE_IDS:
      if (value == null) {
        unsetTopnFilterSourceNodeIds();
      } else {
        setTopnFilterSourceNodeIds((java.util.List<java.lang.Integer>)value);
      }
      break;

    case SCORE_SORT_INFO:
      if (value == null) {
        unsetScoreSortInfo();
      } else {
        setScoreSortInfo((TSortInfo)value);
      }
      break;

    case SCORE_SORT_LIMIT:
      if (value == null) {
        unsetScoreSortLimit();
      } else {
        setScoreSortLimit((java.lang.Long)value);
      }
      break;

    case ANN_SORT_INFO:
      if (value == null) {
        unsetAnnSortInfo();
      } else {
        setAnnSortInfo((TSortInfo)value);
      }
      break;

    case ANN_SORT_LIMIT:
      if (value == null) {
        unsetAnnSortLimit();
      } else {
        setAnnSortLimit((java.lang.Long)value);
      }
      break;

    case SCORE_RANGE_INFO:
      if (value == null) {
        unsetScoreRangeInfo();
      } else {
        setScoreRangeInfo((TScoreRangeInfo)value);
      }
      break;

    case ENABLE_MOR_VALUE_PREDICATE_PUSHDOWN:
      if (value == null) {
        unsetEnableMorValuePredicatePushdown();
      } else {
        setEnableMorValuePredicatePushdown((java.lang.Boolean)value);
      }
      break;

    case READ_MOR_AS_DUP:
      if (value == null) {
        unsetReadMorAsDup();
      } else {
        setReadMorAsDup((java.lang.Boolean)value);
      }
      break;

    }
  }

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

    case KEY_COLUMN_NAME:
      return getKeyColumnName();

    case KEY_COLUMN_TYPE:
      return getKeyColumnType();

    case IS_PREAGGREGATION:
      return isIsPreaggregation();

    case SORT_COLUMN:
      return getSortColumn();

    case KEY_TYPE:
      return getKeyType();

    case TABLE_NAME:
      return getTableName();

    case COLUMNS_DESC:
      return getColumnsDesc();

    case SORT_INFO:
      return getSortInfo();

    case SORT_LIMIT:
      return getSortLimit();

    case ENABLE_UNIQUE_KEY_MERGE_ON_WRITE:
      return isEnableUniqueKeyMergeOnWrite();

    case PUSH_DOWN_AGG_TYPE_OPT:
      return getPushDownAggTypeOpt();

    case USE_TOPN_OPT:
      return isUseTopnOpt();

    case INDEXES_DESC:
      return getIndexesDesc();

    case OUTPUT_COLUMN_UNIQUE_IDS:
      return getOutputColumnUniqueIds();

    case DISTRIBUTE_COLUMN_IDS:
      return getDistributeColumnIds();

    case SCHEMA_VERSION:
      return getSchemaVersion();

    case TOPN_FILTER_SOURCE_NODE_IDS:
      return getTopnFilterSourceNodeIds();

    case SCORE_SORT_INFO:
      return getScoreSortInfo();

    case SCORE_SORT_LIMIT:
      return getScoreSortLimit();

    case ANN_SORT_INFO:
      return getAnnSortInfo();

    case ANN_SORT_LIMIT:
      return getAnnSortLimit();

    case SCORE_RANGE_INFO:
      return getScoreRangeInfo();

    case ENABLE_MOR_VALUE_PREDICATE_PUSHDOWN:
      return isEnableMorValuePredicatePushdown();

    case READ_MOR_AS_DUP:
      return isReadMorAsDup();

    }
    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 TUPLE_ID:
      return isSetTupleId();
    case KEY_COLUMN_NAME:
      return isSetKeyColumnName();
    case KEY_COLUMN_TYPE:
      return isSetKeyColumnType();
    case IS_PREAGGREGATION:
      return isSetIsPreaggregation();
    case SORT_COLUMN:
      return isSetSortColumn();
    case KEY_TYPE:
      return isSetKeyType();
    case TABLE_NAME:
      return isSetTableName();
    case COLUMNS_DESC:
      return isSetColumnsDesc();
    case SORT_INFO:
      return isSetSortInfo();
    case SORT_LIMIT:
      return isSetSortLimit();
    case ENABLE_UNIQUE_KEY_MERGE_ON_WRITE:
      return isSetEnableUniqueKeyMergeOnWrite();
    case PUSH_DOWN_AGG_TYPE_OPT:
      return isSetPushDownAggTypeOpt();
    case USE_TOPN_OPT:
      return isSetUseTopnOpt();
    case INDEXES_DESC:
      return isSetIndexesDesc();
    case OUTPUT_COLUMN_UNIQUE_IDS:
      return isSetOutputColumnUniqueIds();
    case DISTRIBUTE_COLUMN_IDS:
      return isSetDistributeColumnIds();
    case SCHEMA_VERSION:
      return isSetSchemaVersion();
    case TOPN_FILTER_SOURCE_NODE_IDS:
      return isSetTopnFilterSourceNodeIds();
    case SCORE_SORT_INFO:
      return isSetScoreSortInfo();
    case SCORE_SORT_LIMIT:
      return isSetScoreSortLimit();
    case ANN_SORT_INFO:
      return isSetAnnSortInfo();
    case ANN_SORT_LIMIT:
      return isSetAnnSortLimit();
    case SCORE_RANGE_INFO:
      return isSetScoreRangeInfo();
    case ENABLE_MOR_VALUE_PREDICATE_PUSHDOWN:
      return isSetEnableMorValuePredicatePushdown();
    case READ_MOR_AS_DUP:
      return isSetReadMorAsDup();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

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

    boolean this_present_key_column_name = true && this.isSetKeyColumnName();
    boolean that_present_key_column_name = true && that.isSetKeyColumnName();
    if (this_present_key_column_name || that_present_key_column_name) {
      if (!(this_present_key_column_name && that_present_key_column_name))
        return false;
      if (!this.key_column_name.equals(that.key_column_name))
        return false;
    }

    boolean this_present_key_column_type = true && this.isSetKeyColumnType();
    boolean that_present_key_column_type = true && that.isSetKeyColumnType();
    if (this_present_key_column_type || that_present_key_column_type) {
      if (!(this_present_key_column_type && that_present_key_column_type))
        return false;
      if (!this.key_column_type.equals(that.key_column_type))
        return false;
    }

    boolean this_present_is_preaggregation = true;
    boolean that_present_is_preaggregation = true;
    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_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_keyType = true && this.isSetKeyType();
    boolean that_present_keyType = true && that.isSetKeyType();
    if (this_present_keyType || that_present_keyType) {
      if (!(this_present_keyType && that_present_keyType))
        return false;
      if (!this.keyType.equals(that.keyType))
        return false;
    }

    boolean this_present_table_name = true && this.isSetTableName();
    boolean that_present_table_name = true && that.isSetTableName();
    if (this_present_table_name || that_present_table_name) {
      if (!(this_present_table_name && that_present_table_name))
        return false;
      if (!this.table_name.equals(that.table_name))
        return false;
    }

    boolean this_present_columns_desc = true && this.isSetColumnsDesc();
    boolean that_present_columns_desc = true && that.isSetColumnsDesc();
    if (this_present_columns_desc || that_present_columns_desc) {
      if (!(this_present_columns_desc && that_present_columns_desc))
        return false;
      if (!this.columns_desc.equals(that.columns_desc))
        return false;
    }

    boolean this_present_sort_info = true && this.isSetSortInfo();
    boolean that_present_sort_info = true && that.isSetSortInfo();
    if (this_present_sort_info || that_present_sort_info) {
      if (!(this_present_sort_info && that_present_sort_info))
        return false;
      if (!this.sort_info.equals(that.sort_info))
        return false;
    }

    boolean this_present_sort_limit = true && this.isSetSortLimit();
    boolean that_present_sort_limit = true && that.isSetSortLimit();
    if (this_present_sort_limit || that_present_sort_limit) {
      if (!(this_present_sort_limit && that_present_sort_limit))
        return false;
      if (this.sort_limit != that.sort_limit)
        return false;
    }

    boolean this_present_enable_unique_key_merge_on_write = true && this.isSetEnableUniqueKeyMergeOnWrite();
    boolean that_present_enable_unique_key_merge_on_write = true && that.isSetEnableUniqueKeyMergeOnWrite();
    if (this_present_enable_unique_key_merge_on_write || that_present_enable_unique_key_merge_on_write) {
      if (!(this_present_enable_unique_key_merge_on_write && that_present_enable_unique_key_merge_on_write))
        return false;
      if (this.enable_unique_key_merge_on_write != that.enable_unique_key_merge_on_write)
        return false;
    }

    boolean this_present_push_down_agg_type_opt = true && this.isSetPushDownAggTypeOpt();
    boolean that_present_push_down_agg_type_opt = true && that.isSetPushDownAggTypeOpt();
    if (this_present_push_down_agg_type_opt || that_present_push_down_agg_type_opt) {
      if (!(this_present_push_down_agg_type_opt && that_present_push_down_agg_type_opt))
        return false;
      if (!this.push_down_agg_type_opt.equals(that.push_down_agg_type_opt))
        return false;
    }

    boolean this_present_use_topn_opt = true && this.isSetUseTopnOpt();
    boolean that_present_use_topn_opt = true && that.isSetUseTopnOpt();
    if (this_present_use_topn_opt || that_present_use_topn_opt) {
      if (!(this_present_use_topn_opt && that_present_use_topn_opt))
        return false;
      if (this.use_topn_opt != that.use_topn_opt)
        return false;
    }

    boolean this_present_indexes_desc = true && this.isSetIndexesDesc();
    boolean that_present_indexes_desc = true && that.isSetIndexesDesc();
    if (this_present_indexes_desc || that_present_indexes_desc) {
      if (!(this_present_indexes_desc && that_present_indexes_desc))
        return false;
      if (!this.indexes_desc.equals(that.indexes_desc))
        return false;
    }

    boolean this_present_output_column_unique_ids = true && this.isSetOutputColumnUniqueIds();
    boolean that_present_output_column_unique_ids = true && that.isSetOutputColumnUniqueIds();
    if (this_present_output_column_unique_ids || that_present_output_column_unique_ids) {
      if (!(this_present_output_column_unique_ids && that_present_output_column_unique_ids))
        return false;
      if (!this.output_column_unique_ids.equals(that.output_column_unique_ids))
        return false;
    }

    boolean this_present_distribute_column_ids = true && this.isSetDistributeColumnIds();
    boolean that_present_distribute_column_ids = true && that.isSetDistributeColumnIds();
    if (this_present_distribute_column_ids || that_present_distribute_column_ids) {
      if (!(this_present_distribute_column_ids && that_present_distribute_column_ids))
        return false;
      if (!this.distribute_column_ids.equals(that.distribute_column_ids))
        return false;
    }

    boolean this_present_schema_version = true && this.isSetSchemaVersion();
    boolean that_present_schema_version = true && that.isSetSchemaVersion();
    if (this_present_schema_version || that_present_schema_version) {
      if (!(this_present_schema_version && that_present_schema_version))
        return false;
      if (this.schema_version != that.schema_version)
        return false;
    }

    boolean this_present_topn_filter_source_node_ids = true && this.isSetTopnFilterSourceNodeIds();
    boolean that_present_topn_filter_source_node_ids = true && that.isSetTopnFilterSourceNodeIds();
    if (this_present_topn_filter_source_node_ids || that_present_topn_filter_source_node_ids) {
      if (!(this_present_topn_filter_source_node_ids && that_present_topn_filter_source_node_ids))
        return false;
      if (!this.topn_filter_source_node_ids.equals(that.topn_filter_source_node_ids))
        return false;
    }

    boolean this_present_score_sort_info = true && this.isSetScoreSortInfo();
    boolean that_present_score_sort_info = true && that.isSetScoreSortInfo();
    if (this_present_score_sort_info || that_present_score_sort_info) {
      if (!(this_present_score_sort_info && that_present_score_sort_info))
        return false;
      if (!this.score_sort_info.equals(that.score_sort_info))
        return false;
    }

    boolean this_present_score_sort_limit = true && this.isSetScoreSortLimit();
    boolean that_present_score_sort_limit = true && that.isSetScoreSortLimit();
    if (this_present_score_sort_limit || that_present_score_sort_limit) {
      if (!(this_present_score_sort_limit && that_present_score_sort_limit))
        return false;
      if (this.score_sort_limit != that.score_sort_limit)
        return false;
    }

    boolean this_present_ann_sort_info = true && this.isSetAnnSortInfo();
    boolean that_present_ann_sort_info = true && that.isSetAnnSortInfo();
    if (this_present_ann_sort_info || that_present_ann_sort_info) {
      if (!(this_present_ann_sort_info && that_present_ann_sort_info))
        return false;
      if (!this.ann_sort_info.equals(that.ann_sort_info))
        return false;
    }

    boolean this_present_ann_sort_limit = true && this.isSetAnnSortLimit();
    boolean that_present_ann_sort_limit = true && that.isSetAnnSortLimit();
    if (this_present_ann_sort_limit || that_present_ann_sort_limit) {
      if (!(this_present_ann_sort_limit && that_present_ann_sort_limit))
        return false;
      if (this.ann_sort_limit != that.ann_sort_limit)
        return false;
    }

    boolean this_present_score_range_info = true && this.isSetScoreRangeInfo();
    boolean that_present_score_range_info = true && that.isSetScoreRangeInfo();
    if (this_present_score_range_info || that_present_score_range_info) {
      if (!(this_present_score_range_info && that_present_score_range_info))
        return false;
      if (!this.score_range_info.equals(that.score_range_info))
        return false;
    }

    boolean this_present_enable_mor_value_predicate_pushdown = true && this.isSetEnableMorValuePredicatePushdown();
    boolean that_present_enable_mor_value_predicate_pushdown = true && that.isSetEnableMorValuePredicatePushdown();
    if (this_present_enable_mor_value_predicate_pushdown || that_present_enable_mor_value_predicate_pushdown) {
      if (!(this_present_enable_mor_value_predicate_pushdown && that_present_enable_mor_value_predicate_pushdown))
        return false;
      if (this.enable_mor_value_predicate_pushdown != that.enable_mor_value_predicate_pushdown)
        return false;
    }

    boolean this_present_read_mor_as_dup = true && this.isSetReadMorAsDup();
    boolean that_present_read_mor_as_dup = true && that.isSetReadMorAsDup();
    if (this_present_read_mor_as_dup || that_present_read_mor_as_dup) {
      if (!(this_present_read_mor_as_dup && that_present_read_mor_as_dup))
        return false;
      if (this.read_mor_as_dup != that.read_mor_as_dup)
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + tuple_id;

    hashCode = hashCode * 8191 + ((isSetKeyColumnName()) ? 131071 : 524287);
    if (isSetKeyColumnName())
      hashCode = hashCode * 8191 + key_column_name.hashCode();

    hashCode = hashCode * 8191 + ((isSetKeyColumnType()) ? 131071 : 524287);
    if (isSetKeyColumnType())
      hashCode = hashCode * 8191 + key_column_type.hashCode();

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

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

    hashCode = hashCode * 8191 + ((isSetKeyType()) ? 131071 : 524287);
    if (isSetKeyType())
      hashCode = hashCode * 8191 + keyType.getValue();

    hashCode = hashCode * 8191 + ((isSetTableName()) ? 131071 : 524287);
    if (isSetTableName())
      hashCode = hashCode * 8191 + table_name.hashCode();

    hashCode = hashCode * 8191 + ((isSetColumnsDesc()) ? 131071 : 524287);
    if (isSetColumnsDesc())
      hashCode = hashCode * 8191 + columns_desc.hashCode();

    hashCode = hashCode * 8191 + ((isSetSortInfo()) ? 131071 : 524287);
    if (isSetSortInfo())
      hashCode = hashCode * 8191 + sort_info.hashCode();

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

    hashCode = hashCode * 8191 + ((isSetEnableUniqueKeyMergeOnWrite()) ? 131071 : 524287);
    if (isSetEnableUniqueKeyMergeOnWrite())
      hashCode = hashCode * 8191 + ((enable_unique_key_merge_on_write) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetPushDownAggTypeOpt()) ? 131071 : 524287);
    if (isSetPushDownAggTypeOpt())
      hashCode = hashCode * 8191 + push_down_agg_type_opt.getValue();

    hashCode = hashCode * 8191 + ((isSetUseTopnOpt()) ? 131071 : 524287);
    if (isSetUseTopnOpt())
      hashCode = hashCode * 8191 + ((use_topn_opt) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetIndexesDesc()) ? 131071 : 524287);
    if (isSetIndexesDesc())
      hashCode = hashCode * 8191 + indexes_desc.hashCode();

    hashCode = hashCode * 8191 + ((isSetOutputColumnUniqueIds()) ? 131071 : 524287);
    if (isSetOutputColumnUniqueIds())
      hashCode = hashCode * 8191 + output_column_unique_ids.hashCode();

    hashCode = hashCode * 8191 + ((isSetDistributeColumnIds()) ? 131071 : 524287);
    if (isSetDistributeColumnIds())
      hashCode = hashCode * 8191 + distribute_column_ids.hashCode();

    hashCode = hashCode * 8191 + ((isSetSchemaVersion()) ? 131071 : 524287);
    if (isSetSchemaVersion())
      hashCode = hashCode * 8191 + schema_version;

    hashCode = hashCode * 8191 + ((isSetTopnFilterSourceNodeIds()) ? 131071 : 524287);
    if (isSetTopnFilterSourceNodeIds())
      hashCode = hashCode * 8191 + topn_filter_source_node_ids.hashCode();

    hashCode = hashCode * 8191 + ((isSetScoreSortInfo()) ? 131071 : 524287);
    if (isSetScoreSortInfo())
      hashCode = hashCode * 8191 + score_sort_info.hashCode();

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

    hashCode = hashCode * 8191 + ((isSetAnnSortInfo()) ? 131071 : 524287);
    if (isSetAnnSortInfo())
      hashCode = hashCode * 8191 + ann_sort_info.hashCode();

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

    hashCode = hashCode * 8191 + ((isSetScoreRangeInfo()) ? 131071 : 524287);
    if (isSetScoreRangeInfo())
      hashCode = hashCode * 8191 + score_range_info.hashCode();

    hashCode = hashCode * 8191 + ((isSetEnableMorValuePredicatePushdown()) ? 131071 : 524287);
    if (isSetEnableMorValuePredicatePushdown())
      hashCode = hashCode * 8191 + ((enable_mor_value_predicate_pushdown) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetReadMorAsDup()) ? 131071 : 524287);
    if (isSetReadMorAsDup())
      hashCode = hashCode * 8191 + ((read_mor_as_dup) ? 131071 : 524287);

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetTupleId(), other.isSetTupleId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTupleId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tuple_id, other.tuple_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetKeyColumnName(), other.isSetKeyColumnName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetKeyColumnName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key_column_name, other.key_column_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetKeyColumnType(), other.isSetKeyColumnType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetKeyColumnType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key_column_type, other.key_column_type);
      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(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(isSetKeyType(), other.isSetKeyType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetKeyType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyType, other.keyType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTableName(), other.isSetTableName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTableName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetColumnsDesc(), other.isSetColumnsDesc());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetColumnsDesc()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns_desc, other.columns_desc);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSortInfo(), other.isSetSortInfo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSortInfo()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sort_info, other.sort_info);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSortLimit(), other.isSetSortLimit());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSortLimit()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sort_limit, other.sort_limit);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetEnableUniqueKeyMergeOnWrite(), other.isSetEnableUniqueKeyMergeOnWrite());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEnableUniqueKeyMergeOnWrite()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enable_unique_key_merge_on_write, other.enable_unique_key_merge_on_write);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetPushDownAggTypeOpt(), other.isSetPushDownAggTypeOpt());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPushDownAggTypeOpt()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.push_down_agg_type_opt, other.push_down_agg_type_opt);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetUseTopnOpt(), other.isSetUseTopnOpt());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUseTopnOpt()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.use_topn_opt, other.use_topn_opt);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIndexesDesc(), other.isSetIndexesDesc());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIndexesDesc()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.indexes_desc, other.indexes_desc);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetOutputColumnUniqueIds(), other.isSetOutputColumnUniqueIds());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOutputColumnUniqueIds()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.output_column_unique_ids, other.output_column_unique_ids);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetDistributeColumnIds(), other.isSetDistributeColumnIds());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDistributeColumnIds()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.distribute_column_ids, other.distribute_column_ids);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSchemaVersion(), other.isSetSchemaVersion());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSchemaVersion()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schema_version, other.schema_version);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTopnFilterSourceNodeIds(), other.isSetTopnFilterSourceNodeIds());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTopnFilterSourceNodeIds()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.topn_filter_source_node_ids, other.topn_filter_source_node_ids);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetScoreSortInfo(), other.isSetScoreSortInfo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetScoreSortInfo()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.score_sort_info, other.score_sort_info);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetScoreSortLimit(), other.isSetScoreSortLimit());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetScoreSortLimit()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.score_sort_limit, other.score_sort_limit);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetAnnSortInfo(), other.isSetAnnSortInfo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAnnSortInfo()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ann_sort_info, other.ann_sort_info);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetAnnSortLimit(), other.isSetAnnSortLimit());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAnnSortLimit()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ann_sort_limit, other.ann_sort_limit);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetScoreRangeInfo(), other.isSetScoreRangeInfo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetScoreRangeInfo()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.score_range_info, other.score_range_info);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetEnableMorValuePredicatePushdown(), other.isSetEnableMorValuePredicatePushdown());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEnableMorValuePredicatePushdown()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enable_mor_value_predicate_pushdown, other.enable_mor_value_predicate_pushdown);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetReadMorAsDup(), other.isSetReadMorAsDup());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetReadMorAsDup()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.read_mor_as_dup, other.read_mor_as_dup);
      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("TOlapScanNode(");
    boolean first = true;

    sb.append("tuple_id:");
    sb.append(this.tuple_id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("key_column_name:");
    if (this.key_column_name == null) {
      sb.append("null");
    } else {
      sb.append(this.key_column_name);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("key_column_type:");
    if (this.key_column_type == null) {
      sb.append("null");
    } else {
      sb.append(this.key_column_type);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("is_preaggregation:");
    sb.append(this.is_preaggregation);
    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 (isSetKeyType()) {
      if (!first) sb.append(", ");
      sb.append("keyType:");
      if (this.keyType == null) {
        sb.append("null");
      } else {
        sb.append(this.keyType);
      }
      first = false;
    }
    if (isSetTableName()) {
      if (!first) sb.append(", ");
      sb.append("table_name:");
      if (this.table_name == null) {
        sb.append("null");
      } else {
        sb.append(this.table_name);
      }
      first = false;
    }
    if (isSetColumnsDesc()) {
      if (!first) sb.append(", ");
      sb.append("columns_desc:");
      if (this.columns_desc == null) {
        sb.append("null");
      } else {
        sb.append(this.columns_desc);
      }
      first = false;
    }
    if (isSetSortInfo()) {
      if (!first) sb.append(", ");
      sb.append("sort_info:");
      if (this.sort_info == null) {
        sb.append("null");
      } else {
        sb.append(this.sort_info);
      }
      first = false;
    }
    if (isSetSortLimit()) {
      if (!first) sb.append(", ");
      sb.append("sort_limit:");
      sb.append(this.sort_limit);
      first = false;
    }
    if (isSetEnableUniqueKeyMergeOnWrite()) {
      if (!first) sb.append(", ");
      sb.append("enable_unique_key_merge_on_write:");
      sb.append(this.enable_unique_key_merge_on_write);
      first = false;
    }
    if (isSetPushDownAggTypeOpt()) {
      if (!first) sb.append(", ");
      sb.append("push_down_agg_type_opt:");
      if (this.push_down_agg_type_opt == null) {
        sb.append("null");
      } else {
        sb.append(this.push_down_agg_type_opt);
      }
      first = false;
    }
    if (isSetUseTopnOpt()) {
      if (!first) sb.append(", ");
      sb.append("use_topn_opt:");
      sb.append(this.use_topn_opt);
      first = false;
    }
    if (isSetIndexesDesc()) {
      if (!first) sb.append(", ");
      sb.append("indexes_desc:");
      if (this.indexes_desc == null) {
        sb.append("null");
      } else {
        sb.append(this.indexes_desc);
      }
      first = false;
    }
    if (isSetOutputColumnUniqueIds()) {
      if (!first) sb.append(", ");
      sb.append("output_column_unique_ids:");
      if (this.output_column_unique_ids == null) {
        sb.append("null");
      } else {
        sb.append(this.output_column_unique_ids);
      }
      first = false;
    }
    if (isSetDistributeColumnIds()) {
      if (!first) sb.append(", ");
      sb.append("distribute_column_ids:");
      if (this.distribute_column_ids == null) {
        sb.append("null");
      } else {
        sb.append(this.distribute_column_ids);
      }
      first = false;
    }
    if (isSetSchemaVersion()) {
      if (!first) sb.append(", ");
      sb.append("schema_version:");
      sb.append(this.schema_version);
      first = false;
    }
    if (isSetTopnFilterSourceNodeIds()) {
      if (!first) sb.append(", ");
      sb.append("topn_filter_source_node_ids:");
      if (this.topn_filter_source_node_ids == null) {
        sb.append("null");
      } else {
        sb.append(this.topn_filter_source_node_ids);
      }
      first = false;
    }
    if (isSetScoreSortInfo()) {
      if (!first) sb.append(", ");
      sb.append("score_sort_info:");
      if (this.score_sort_info == null) {
        sb.append("null");
      } else {
        sb.append(this.score_sort_info);
      }
      first = false;
    }
    if (isSetScoreSortLimit()) {
      if (!first) sb.append(", ");
      sb.append("score_sort_limit:");
      sb.append(this.score_sort_limit);
      first = false;
    }
    if (isSetAnnSortInfo()) {
      if (!first) sb.append(", ");
      sb.append("ann_sort_info:");
      if (this.ann_sort_info == null) {
        sb.append("null");
      } else {
        sb.append(this.ann_sort_info);
      }
      first = false;
    }
    if (isSetAnnSortLimit()) {
      if (!first) sb.append(", ");
      sb.append("ann_sort_limit:");
      sb.append(this.ann_sort_limit);
      first = false;
    }
    if (isSetScoreRangeInfo()) {
      if (!first) sb.append(", ");
      sb.append("score_range_info:");
      if (this.score_range_info == null) {
        sb.append("null");
      } else {
        sb.append(this.score_range_info);
      }
      first = false;
    }
    if (isSetEnableMorValuePredicatePushdown()) {
      if (!first) sb.append(", ");
      sb.append("enable_mor_value_predicate_pushdown:");
      sb.append(this.enable_mor_value_predicate_pushdown);
      first = false;
    }
    if (isSetReadMorAsDup()) {
      if (!first) sb.append(", ");
      sb.append("read_mor_as_dup:");
      sb.append(this.read_mor_as_dup);
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

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

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

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
    try {
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
      __isset_bitfield = 0;
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

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

  private static class TOlapScanNodeStandardScheme extends org.apache.thrift.scheme.StandardScheme<TOlapScanNode> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TOlapScanNode 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: // TUPLE_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.tuple_id = iprot.readI32();
              struct.setTupleIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // KEY_COLUMN_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list626 = iprot.readListBegin();
                struct.key_column_name = new java.util.ArrayList<java.lang.String>(_list626.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _elem627;
                for (int _i628 = 0; _i628 < _list626.size; ++_i628)
                {
                  _elem627 = iprot.readString();
                  struct.key_column_name.add(_elem627);
                }
                iprot.readListEnd();
              }
              struct.setKeyColumnNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // KEY_COLUMN_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list629 = iprot.readListBegin();
                struct.key_column_type = new java.util.ArrayList<org.apache.doris.thrift.TPrimitiveType>(_list629.size);
                @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TPrimitiveType _elem630;
                for (int _i631 = 0; _i631 < _list629.size; ++_i631)
                {
                  _elem630 = org.apache.doris.thrift.TPrimitiveType.findByValue(iprot.readI32());
                  if (_elem630 != null)
                  {
                    struct.key_column_type.add(_elem630);
                  }
                }
                iprot.readListEnd();
              }
              struct.setKeyColumnTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // 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 5: // 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 6: // KEY_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.keyType = org.apache.doris.thrift.TKeysType.findByValue(iprot.readI32());
              struct.setKeyTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // TABLE_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.table_name = iprot.readString();
              struct.setTableNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // COLUMNS_DESC
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list632 = iprot.readListBegin();
                struct.columns_desc = new java.util.ArrayList<org.apache.doris.thrift.TColumn>(_list632.size);
                @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TColumn _elem633;
                for (int _i634 = 0; _i634 < _list632.size; ++_i634)
                {
                  _elem633 = new org.apache.doris.thrift.TColumn();
                  _elem633.read(iprot);
                  struct.columns_desc.add(_elem633);
                }
                iprot.readListEnd();
              }
              struct.setColumnsDescIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // SORT_INFO
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.sort_info = new TSortInfo();
              struct.sort_info.read(iprot);
              struct.setSortInfoIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // SORT_LIMIT
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.sort_limit = iprot.readI64();
              struct.setSortLimitIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // ENABLE_UNIQUE_KEY_MERGE_ON_WRITE
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.enable_unique_key_merge_on_write = iprot.readBool();
              struct.setEnableUniqueKeyMergeOnWriteIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 12: // PUSH_DOWN_AGG_TYPE_OPT
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.push_down_agg_type_opt = org.apache.doris.thrift.TPushAggOp.findByValue(iprot.readI32());
              struct.setPushDownAggTypeOptIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 13: // USE_TOPN_OPT
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.use_topn_opt = iprot.readBool();
              struct.setUseTopnOptIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 14: // INDEXES_DESC
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list635 = iprot.readListBegin();
                struct.indexes_desc = new java.util.ArrayList<org.apache.doris.thrift.TOlapTableIndex>(_list635.size);
                @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TOlapTableIndex _elem636;
                for (int _i637 = 0; _i637 < _list635.size; ++_i637)
                {
                  _elem636 = new org.apache.doris.thrift.TOlapTableIndex();
                  _elem636.read(iprot);
                  struct.indexes_desc.add(_elem636);
                }
                iprot.readListEnd();
              }
              struct.setIndexesDescIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 15: // OUTPUT_COLUMN_UNIQUE_IDS
            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
              {
                org.apache.thrift.protocol.TSet _set638 = iprot.readSetBegin();
                struct.output_column_unique_ids = new java.util.HashSet<java.lang.Integer>(2*_set638.size);
                int _elem639;
                for (int _i640 = 0; _i640 < _set638.size; ++_i640)
                {
                  _elem639 = iprot.readI32();
                  struct.output_column_unique_ids.add(_elem639);
                }
                iprot.readSetEnd();
              }
              struct.setOutputColumnUniqueIdsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 16: // DISTRIBUTE_COLUMN_IDS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list641 = iprot.readListBegin();
                struct.distribute_column_ids = new java.util.ArrayList<java.lang.Integer>(_list641.size);
                int _elem642;
                for (int _i643 = 0; _i643 < _list641.size; ++_i643)
                {
                  _elem642 = iprot.readI32();
                  struct.distribute_column_ids.add(_elem642);
                }
                iprot.readListEnd();
              }
              struct.setDistributeColumnIdsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 17: // SCHEMA_VERSION
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.schema_version = iprot.readI32();
              struct.setSchemaVersionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 18: // TOPN_FILTER_SOURCE_NODE_IDS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list644 = iprot.readListBegin();
                struct.topn_filter_source_node_ids = new java.util.ArrayList<java.lang.Integer>(_list644.size);
                int _elem645;
                for (int _i646 = 0; _i646 < _list644.size; ++_i646)
                {
                  _elem645 = iprot.readI32();
                  struct.topn_filter_source_node_ids.add(_elem645);
                }
                iprot.readListEnd();
              }
              struct.setTopnFilterSourceNodeIdsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 19: // SCORE_SORT_INFO
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.score_sort_info = new TSortInfo();
              struct.score_sort_info.read(iprot);
              struct.setScoreSortInfoIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 20: // SCORE_SORT_LIMIT
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.score_sort_limit = iprot.readI64();
              struct.setScoreSortLimitIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 21: // ANN_SORT_INFO
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.ann_sort_info = new TSortInfo();
              struct.ann_sort_info.read(iprot);
              struct.setAnnSortInfoIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 22: // ANN_SORT_LIMIT
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.ann_sort_limit = iprot.readI64();
              struct.setAnnSortLimitIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 23: // SCORE_RANGE_INFO
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.score_range_info = new TScoreRangeInfo();
              struct.score_range_info.read(iprot);
              struct.setScoreRangeInfoIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 24: // ENABLE_MOR_VALUE_PREDICATE_PUSHDOWN
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.enable_mor_value_predicate_pushdown = iprot.readBool();
              struct.setEnableMorValuePredicatePushdownIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 25: // READ_MOR_AS_DUP
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.read_mor_as_dup = iprot.readBool();
              struct.setReadMorAsDupIsSet(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.isSetTupleId()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'tuple_id' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetIsPreaggregation()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'is_preaggregation' was not found in serialized data! Struct: " + toString());
      }
      struct.validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(TUPLE_ID_FIELD_DESC);
      oprot.writeI32(struct.tuple_id);
      oprot.writeFieldEnd();
      if (struct.key_column_name != null) {
        oprot.writeFieldBegin(KEY_COLUMN_NAME_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.key_column_name.size()));
          for (java.lang.String _iter647 : struct.key_column_name)
          {
            oprot.writeString(_iter647);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.key_column_type != null) {
        oprot.writeFieldBegin(KEY_COLUMN_TYPE_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.key_column_type.size()));
          for (org.apache.doris.thrift.TPrimitiveType _iter648 : struct.key_column_type)
          {
            oprot.writeI32(_iter648.getValue());
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(IS_PREAGGREGATION_FIELD_DESC);
      oprot.writeBool(struct.is_preaggregation);
      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.keyType != null) {
        if (struct.isSetKeyType()) {
          oprot.writeFieldBegin(KEY_TYPE_FIELD_DESC);
          oprot.writeI32(struct.keyType.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.table_name != null) {
        if (struct.isSetTableName()) {
          oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
          oprot.writeString(struct.table_name);
          oprot.writeFieldEnd();
        }
      }
      if (struct.columns_desc != null) {
        if (struct.isSetColumnsDesc()) {
          oprot.writeFieldBegin(COLUMNS_DESC_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns_desc.size()));
            for (org.apache.doris.thrift.TColumn _iter649 : struct.columns_desc)
            {
              _iter649.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.sort_info != null) {
        if (struct.isSetSortInfo()) {
          oprot.writeFieldBegin(SORT_INFO_FIELD_DESC);
          struct.sort_info.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetSortLimit()) {
        oprot.writeFieldBegin(SORT_LIMIT_FIELD_DESC);
        oprot.writeI64(struct.sort_limit);
        oprot.writeFieldEnd();
      }
      if (struct.isSetEnableUniqueKeyMergeOnWrite()) {
        oprot.writeFieldBegin(ENABLE_UNIQUE_KEY_MERGE_ON_WRITE_FIELD_DESC);
        oprot.writeBool(struct.enable_unique_key_merge_on_write);
        oprot.writeFieldEnd();
      }
      if (struct.push_down_agg_type_opt != null) {
        if (struct.isSetPushDownAggTypeOpt()) {
          oprot.writeFieldBegin(PUSH_DOWN_AGG_TYPE_OPT_FIELD_DESC);
          oprot.writeI32(struct.push_down_agg_type_opt.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetUseTopnOpt()) {
        oprot.writeFieldBegin(USE_TOPN_OPT_FIELD_DESC);
        oprot.writeBool(struct.use_topn_opt);
        oprot.writeFieldEnd();
      }
      if (struct.indexes_desc != null) {
        if (struct.isSetIndexesDesc()) {
          oprot.writeFieldBegin(INDEXES_DESC_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.indexes_desc.size()));
            for (org.apache.doris.thrift.TOlapTableIndex _iter650 : struct.indexes_desc)
            {
              _iter650.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.output_column_unique_ids != null) {
        if (struct.isSetOutputColumnUniqueIds()) {
          oprot.writeFieldBegin(OUTPUT_COLUMN_UNIQUE_IDS_FIELD_DESC);
          {
            oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, struct.output_column_unique_ids.size()));
            for (int _iter651 : struct.output_column_unique_ids)
            {
              oprot.writeI32(_iter651);
            }
            oprot.writeSetEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.distribute_column_ids != null) {
        if (struct.isSetDistributeColumnIds()) {
          oprot.writeFieldBegin(DISTRIBUTE_COLUMN_IDS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.distribute_column_ids.size()));
            for (int _iter652 : struct.distribute_column_ids)
            {
              oprot.writeI32(_iter652);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetSchemaVersion()) {
        oprot.writeFieldBegin(SCHEMA_VERSION_FIELD_DESC);
        oprot.writeI32(struct.schema_version);
        oprot.writeFieldEnd();
      }
      if (struct.topn_filter_source_node_ids != null) {
        if (struct.isSetTopnFilterSourceNodeIds()) {
          oprot.writeFieldBegin(TOPN_FILTER_SOURCE_NODE_IDS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.topn_filter_source_node_ids.size()));
            for (int _iter653 : struct.topn_filter_source_node_ids)
            {
              oprot.writeI32(_iter653);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.score_sort_info != null) {
        if (struct.isSetScoreSortInfo()) {
          oprot.writeFieldBegin(SCORE_SORT_INFO_FIELD_DESC);
          struct.score_sort_info.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetScoreSortLimit()) {
        oprot.writeFieldBegin(SCORE_SORT_LIMIT_FIELD_DESC);
        oprot.writeI64(struct.score_sort_limit);
        oprot.writeFieldEnd();
      }
      if (struct.ann_sort_info != null) {
        if (struct.isSetAnnSortInfo()) {
          oprot.writeFieldBegin(ANN_SORT_INFO_FIELD_DESC);
          struct.ann_sort_info.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetAnnSortLimit()) {
        oprot.writeFieldBegin(ANN_SORT_LIMIT_FIELD_DESC);
        oprot.writeI64(struct.ann_sort_limit);
        oprot.writeFieldEnd();
      }
      if (struct.score_range_info != null) {
        if (struct.isSetScoreRangeInfo()) {
          oprot.writeFieldBegin(SCORE_RANGE_INFO_FIELD_DESC);
          struct.score_range_info.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetEnableMorValuePredicatePushdown()) {
        oprot.writeFieldBegin(ENABLE_MOR_VALUE_PREDICATE_PUSHDOWN_FIELD_DESC);
        oprot.writeBool(struct.enable_mor_value_predicate_pushdown);
        oprot.writeFieldEnd();
      }
      if (struct.isSetReadMorAsDup()) {
        oprot.writeFieldBegin(READ_MOR_AS_DUP_FIELD_DESC);
        oprot.writeBool(struct.read_mor_as_dup);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TOlapScanNodeTupleScheme extends org.apache.thrift.scheme.TupleScheme<TOlapScanNode> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TOlapScanNode struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      oprot.writeI32(struct.tuple_id);
      {
        oprot.writeI32(struct.key_column_name.size());
        for (java.lang.String _iter654 : struct.key_column_name)
        {
          oprot.writeString(_iter654);
        }
      }
      {
        oprot.writeI32(struct.key_column_type.size());
        for (org.apache.doris.thrift.TPrimitiveType _iter655 : struct.key_column_type)
        {
          oprot.writeI32(_iter655.getValue());
        }
      }
      oprot.writeBool(struct.is_preaggregation);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetSortColumn()) {
        optionals.set(0);
      }
      if (struct.isSetKeyType()) {
        optionals.set(1);
      }
      if (struct.isSetTableName()) {
        optionals.set(2);
      }
      if (struct.isSetColumnsDesc()) {
        optionals.set(3);
      }
      if (struct.isSetSortInfo()) {
        optionals.set(4);
      }
      if (struct.isSetSortLimit()) {
        optionals.set(5);
      }
      if (struct.isSetEnableUniqueKeyMergeOnWrite()) {
        optionals.set(6);
      }
      if (struct.isSetPushDownAggTypeOpt()) {
        optionals.set(7);
      }
      if (struct.isSetUseTopnOpt()) {
        optionals.set(8);
      }
      if (struct.isSetIndexesDesc()) {
        optionals.set(9);
      }
      if (struct.isSetOutputColumnUniqueIds()) {
        optionals.set(10);
      }
      if (struct.isSetDistributeColumnIds()) {
        optionals.set(11);
      }
      if (struct.isSetSchemaVersion()) {
        optionals.set(12);
      }
      if (struct.isSetTopnFilterSourceNodeIds()) {
        optionals.set(13);
      }
      if (struct.isSetScoreSortInfo()) {
        optionals.set(14);
      }
      if (struct.isSetScoreSortLimit()) {
        optionals.set(15);
      }
      if (struct.isSetAnnSortInfo()) {
        optionals.set(16);
      }
      if (struct.isSetAnnSortLimit()) {
        optionals.set(17);
      }
      if (struct.isSetScoreRangeInfo()) {
        optionals.set(18);
      }
      if (struct.isSetEnableMorValuePredicatePushdown()) {
        optionals.set(19);
      }
      if (struct.isSetReadMorAsDup()) {
        optionals.set(20);
      }
      oprot.writeBitSet(optionals, 21);
      if (struct.isSetSortColumn()) {
        oprot.writeString(struct.sort_column);
      }
      if (struct.isSetKeyType()) {
        oprot.writeI32(struct.keyType.getValue());
      }
      if (struct.isSetTableName()) {
        oprot.writeString(struct.table_name);
      }
      if (struct.isSetColumnsDesc()) {
        {
          oprot.writeI32(struct.columns_desc.size());
          for (org.apache.doris.thrift.TColumn _iter656 : struct.columns_desc)
          {
            _iter656.write(oprot);
          }
        }
      }
      if (struct.isSetSortInfo()) {
        struct.sort_info.write(oprot);
      }
      if (struct.isSetSortLimit()) {
        oprot.writeI64(struct.sort_limit);
      }
      if (struct.isSetEnableUniqueKeyMergeOnWrite()) {
        oprot.writeBool(struct.enable_unique_key_merge_on_write);
      }
      if (struct.isSetPushDownAggTypeOpt()) {
        oprot.writeI32(struct.push_down_agg_type_opt.getValue());
      }
      if (struct.isSetUseTopnOpt()) {
        oprot.writeBool(struct.use_topn_opt);
      }
      if (struct.isSetIndexesDesc()) {
        {
          oprot.writeI32(struct.indexes_desc.size());
          for (org.apache.doris.thrift.TOlapTableIndex _iter657 : struct.indexes_desc)
          {
            _iter657.write(oprot);
          }
        }
      }
      if (struct.isSetOutputColumnUniqueIds()) {
        {
          oprot.writeI32(struct.output_column_unique_ids.size());
          for (int _iter658 : struct.output_column_unique_ids)
          {
            oprot.writeI32(_iter658);
          }
        }
      }
      if (struct.isSetDistributeColumnIds()) {
        {
          oprot.writeI32(struct.distribute_column_ids.size());
          for (int _iter659 : struct.distribute_column_ids)
          {
            oprot.writeI32(_iter659);
          }
        }
      }
      if (struct.isSetSchemaVersion()) {
        oprot.writeI32(struct.schema_version);
      }
      if (struct.isSetTopnFilterSourceNodeIds()) {
        {
          oprot.writeI32(struct.topn_filter_source_node_ids.size());
          for (int _iter660 : struct.topn_filter_source_node_ids)
          {
            oprot.writeI32(_iter660);
          }
        }
      }
      if (struct.isSetScoreSortInfo()) {
        struct.score_sort_info.write(oprot);
      }
      if (struct.isSetScoreSortLimit()) {
        oprot.writeI64(struct.score_sort_limit);
      }
      if (struct.isSetAnnSortInfo()) {
        struct.ann_sort_info.write(oprot);
      }
      if (struct.isSetAnnSortLimit()) {
        oprot.writeI64(struct.ann_sort_limit);
      }
      if (struct.isSetScoreRangeInfo()) {
        struct.score_range_info.write(oprot);
      }
      if (struct.isSetEnableMorValuePredicatePushdown()) {
        oprot.writeBool(struct.enable_mor_value_predicate_pushdown);
      }
      if (struct.isSetReadMorAsDup()) {
        oprot.writeBool(struct.read_mor_as_dup);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TOlapScanNode struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.tuple_id = iprot.readI32();
      struct.setTupleIdIsSet(true);
      {
        org.apache.thrift.protocol.TList _list661 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
        struct.key_column_name = new java.util.ArrayList<java.lang.String>(_list661.size);
        @org.apache.thrift.annotation.Nullable java.lang.String _elem662;
        for (int _i663 = 0; _i663 < _list661.size; ++_i663)
        {
          _elem662 = iprot.readString();
          struct.key_column_name.add(_elem662);
        }
      }
      struct.setKeyColumnNameIsSet(true);
      {
        org.apache.thrift.protocol.TList _list664 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
        struct.key_column_type = new java.util.ArrayList<org.apache.doris.thrift.TPrimitiveType>(_list664.size);
        @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TPrimitiveType _elem665;
        for (int _i666 = 0; _i666 < _list664.size; ++_i666)
        {
          _elem665 = org.apache.doris.thrift.TPrimitiveType.findByValue(iprot.readI32());
          if (_elem665 != null)
          {
            struct.key_column_type.add(_elem665);
          }
        }
      }
      struct.setKeyColumnTypeIsSet(true);
      struct.is_preaggregation = iprot.readBool();
      struct.setIsPreaggregationIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(21);
      if (incoming.get(0)) {
        struct.sort_column = iprot.readString();
        struct.setSortColumnIsSet(true);
      }
      if (incoming.get(1)) {
        struct.keyType = org.apache.doris.thrift.TKeysType.findByValue(iprot.readI32());
        struct.setKeyTypeIsSet(true);
      }
      if (incoming.get(2)) {
        struct.table_name = iprot.readString();
        struct.setTableNameIsSet(true);
      }
      if (incoming.get(3)) {
        {
          org.apache.thrift.protocol.TList _list667 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
          struct.columns_desc = new java.util.ArrayList<org.apache.doris.thrift.TColumn>(_list667.size);
          @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TColumn _elem668;
          for (int _i669 = 0; _i669 < _list667.size; ++_i669)
          {
            _elem668 = new org.apache.doris.thrift.TColumn();
            _elem668.read(iprot);
            struct.columns_desc.add(_elem668);
          }
        }
        struct.setColumnsDescIsSet(true);
      }
      if (incoming.get(4)) {
        struct.sort_info = new TSortInfo();
        struct.sort_info.read(iprot);
        struct.setSortInfoIsSet(true);
      }
      if (incoming.get(5)) {
        struct.sort_limit = iprot.readI64();
        struct.setSortLimitIsSet(true);
      }
      if (incoming.get(6)) {
        struct.enable_unique_key_merge_on_write = iprot.readBool();
        struct.setEnableUniqueKeyMergeOnWriteIsSet(true);
      }
      if (incoming.get(7)) {
        struct.push_down_agg_type_opt = org.apache.doris.thrift.TPushAggOp.findByValue(iprot.readI32());
        struct.setPushDownAggTypeOptIsSet(true);
      }
      if (incoming.get(8)) {
        struct.use_topn_opt = iprot.readBool();
        struct.setUseTopnOptIsSet(true);
      }
      if (incoming.get(9)) {
        {
          org.apache.thrift.protocol.TList _list670 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
          struct.indexes_desc = new java.util.ArrayList<org.apache.doris.thrift.TOlapTableIndex>(_list670.size);
          @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TOlapTableIndex _elem671;
          for (int _i672 = 0; _i672 < _list670.size; ++_i672)
          {
            _elem671 = new org.apache.doris.thrift.TOlapTableIndex();
            _elem671.read(iprot);
            struct.indexes_desc.add(_elem671);
          }
        }
        struct.setIndexesDescIsSet(true);
      }
      if (incoming.get(10)) {
        {
          org.apache.thrift.protocol.TSet _set673 = iprot.readSetBegin(org.apache.thrift.protocol.TType.I32);
          struct.output_column_unique_ids = new java.util.HashSet<java.lang.Integer>(2*_set673.size);
          int _elem674;
          for (int _i675 = 0; _i675 < _set673.size; ++_i675)
          {
            _elem674 = iprot.readI32();
            struct.output_column_unique_ids.add(_elem674);
          }
        }
        struct.setOutputColumnUniqueIdsIsSet(true);
      }
      if (incoming.get(11)) {
        {
          org.apache.thrift.protocol.TList _list676 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
          struct.distribute_column_ids = new java.util.ArrayList<java.lang.Integer>(_list676.size);
          int _elem677;
          for (int _i678 = 0; _i678 < _list676.size; ++_i678)
          {
            _elem677 = iprot.readI32();
            struct.distribute_column_ids.add(_elem677);
          }
        }
        struct.setDistributeColumnIdsIsSet(true);
      }
      if (incoming.get(12)) {
        struct.schema_version = iprot.readI32();
        struct.setSchemaVersionIsSet(true);
      }
      if (incoming.get(13)) {
        {
          org.apache.thrift.protocol.TList _list679 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
          struct.topn_filter_source_node_ids = new java.util.ArrayList<java.lang.Integer>(_list679.size);
          int _elem680;
          for (int _i681 = 0; _i681 < _list679.size; ++_i681)
          {
            _elem680 = iprot.readI32();
            struct.topn_filter_source_node_ids.add(_elem680);
          }
        }
        struct.setTopnFilterSourceNodeIdsIsSet(true);
      }
      if (incoming.get(14)) {
        struct.score_sort_info = new TSortInfo();
        struct.score_sort_info.read(iprot);
        struct.setScoreSortInfoIsSet(true);
      }
      if (incoming.get(15)) {
        struct.score_sort_limit = iprot.readI64();
        struct.setScoreSortLimitIsSet(true);
      }
      if (incoming.get(16)) {
        struct.ann_sort_info = new TSortInfo();
        struct.ann_sort_info.read(iprot);
        struct.setAnnSortInfoIsSet(true);
      }
      if (incoming.get(17)) {
        struct.ann_sort_limit = iprot.readI64();
        struct.setAnnSortLimitIsSet(true);
      }
      if (incoming.get(18)) {
        struct.score_range_info = new TScoreRangeInfo();
        struct.score_range_info.read(iprot);
        struct.setScoreRangeInfoIsSet(true);
      }
      if (incoming.get(19)) {
        struct.enable_mor_value_predicate_pushdown = iprot.readBool();
        struct.setEnableMorValuePredicatePushdownIsSet(true);
      }
      if (incoming.get(20)) {
        struct.read_mor_as_dup = iprot.readBool();
        struct.setReadMorAsDupIsSet(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();
  }
}