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

  private static final org.apache.thrift.protocol.TField LOAD_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("load_id", org.apache.thrift.protocol.TType.STRUCT, (short)1);
  private static final org.apache.thrift.protocol.TField TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("txn_id", org.apache.thrift.protocol.TType.I64, (short)2);
  private static final org.apache.thrift.protocol.TField DB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("db_id", org.apache.thrift.protocol.TType.I64, (short)3);
  private static final org.apache.thrift.protocol.TField TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("table_id", org.apache.thrift.protocol.TType.I64, (short)4);
  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)5);
  private static final org.apache.thrift.protocol.TField NUM_REPLICAS_FIELD_DESC = new org.apache.thrift.protocol.TField("num_replicas", org.apache.thrift.protocol.TType.I32, (short)6);
  private static final org.apache.thrift.protocol.TField NEED_GEN_ROLLUP_FIELD_DESC = new org.apache.thrift.protocol.TField("need_gen_rollup", org.apache.thrift.protocol.TType.BOOL, (short)7);
  private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)8);
  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)9);
  private static final org.apache.thrift.protocol.TField SCHEMA_FIELD_DESC = new org.apache.thrift.protocol.TField("schema", org.apache.thrift.protocol.TType.STRUCT, (short)10);
  private static final org.apache.thrift.protocol.TField PARTITION_FIELD_DESC = new org.apache.thrift.protocol.TField("partition", org.apache.thrift.protocol.TType.STRUCT, (short)11);
  private static final org.apache.thrift.protocol.TField LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("location", org.apache.thrift.protocol.TType.STRUCT, (short)12);
  private static final org.apache.thrift.protocol.TField NODES_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("nodes_info", org.apache.thrift.protocol.TType.STRUCT, (short)13);
  private static final org.apache.thrift.protocol.TField LOAD_CHANNEL_TIMEOUT_S_FIELD_DESC = new org.apache.thrift.protocol.TField("load_channel_timeout_s", org.apache.thrift.protocol.TType.I64, (short)14);
  private static final org.apache.thrift.protocol.TField SEND_BATCH_PARALLELISM_FIELD_DESC = new org.apache.thrift.protocol.TField("send_batch_parallelism", org.apache.thrift.protocol.TType.I32, (short)15);
  private static final org.apache.thrift.protocol.TField LOAD_TO_SINGLE_TABLET_FIELD_DESC = new org.apache.thrift.protocol.TField("load_to_single_tablet", org.apache.thrift.protocol.TType.BOOL, (short)16);
  private static final org.apache.thrift.protocol.TField WRITE_SINGLE_REPLICA_FIELD_DESC = new org.apache.thrift.protocol.TField("write_single_replica", org.apache.thrift.protocol.TType.BOOL, (short)17);
  private static final org.apache.thrift.protocol.TField SLAVE_LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("slave_location", org.apache.thrift.protocol.TType.STRUCT, (short)18);
  private static final org.apache.thrift.protocol.TField TXN_TIMEOUT_S_FIELD_DESC = new org.apache.thrift.protocol.TField("txn_timeout_s", org.apache.thrift.protocol.TType.I64, (short)19);
  private static final org.apache.thrift.protocol.TField WRITE_FILE_CACHE_FIELD_DESC = new org.apache.thrift.protocol.TField("write_file_cache", org.apache.thrift.protocol.TType.BOOL, (short)20);
  private static final org.apache.thrift.protocol.TField BASE_SCHEMA_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("base_schema_version", org.apache.thrift.protocol.TType.I64, (short)21);
  private static final org.apache.thrift.protocol.TField GROUP_COMMIT_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("group_commit_mode", org.apache.thrift.protocol.TType.I32, (short)22);
  private static final org.apache.thrift.protocol.TField MAX_FILTER_RATIO_FIELD_DESC = new org.apache.thrift.protocol.TField("max_filter_ratio", org.apache.thrift.protocol.TType.DOUBLE, (short)23);
  private static final org.apache.thrift.protocol.TField STORAGE_VAULT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("storage_vault_id", org.apache.thrift.protocol.TType.STRING, (short)24);

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

  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TUniqueId load_id; // required
  public long txn_id; // required
  public long db_id; // required
  public long table_id; // required
  public int tuple_id; // required
  public int num_replicas; // required
  public boolean need_gen_rollup; // required
  public @org.apache.thrift.annotation.Nullable java.lang.String db_name; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String table_name; // optional
  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TOlapTableSchemaParam schema; // required
  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TOlapTablePartitionParam partition; // required
  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TOlapTableLocationParam location; // required
  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TPaloNodesInfo nodes_info; // required
  public long load_channel_timeout_s; // optional
  public int send_batch_parallelism; // optional
  public boolean load_to_single_tablet; // optional
  public boolean write_single_replica; // optional
  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TOlapTableLocationParam slave_location; // optional
  public long txn_timeout_s; // optional
  public boolean write_file_cache; // optional
  public long base_schema_version; // optional
  /**
   * 
   * @see TGroupCommitMode
   */
  public @org.apache.thrift.annotation.Nullable TGroupCommitMode group_commit_mode; // optional
  public double max_filter_ratio; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String storage_vault_id; // 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 {
    LOAD_ID((short)1, "load_id"),
    TXN_ID((short)2, "txn_id"),
    DB_ID((short)3, "db_id"),
    TABLE_ID((short)4, "table_id"),
    TUPLE_ID((short)5, "tuple_id"),
    NUM_REPLICAS((short)6, "num_replicas"),
    NEED_GEN_ROLLUP((short)7, "need_gen_rollup"),
    DB_NAME((short)8, "db_name"),
    TABLE_NAME((short)9, "table_name"),
    SCHEMA((short)10, "schema"),
    PARTITION((short)11, "partition"),
    LOCATION((short)12, "location"),
    NODES_INFO((short)13, "nodes_info"),
    LOAD_CHANNEL_TIMEOUT_S((short)14, "load_channel_timeout_s"),
    SEND_BATCH_PARALLELISM((short)15, "send_batch_parallelism"),
    LOAD_TO_SINGLE_TABLET((short)16, "load_to_single_tablet"),
    WRITE_SINGLE_REPLICA((short)17, "write_single_replica"),
    SLAVE_LOCATION((short)18, "slave_location"),
    TXN_TIMEOUT_S((short)19, "txn_timeout_s"),
    WRITE_FILE_CACHE((short)20, "write_file_cache"),
    BASE_SCHEMA_VERSION((short)21, "base_schema_version"),
    /**
     * 
     * @see TGroupCommitMode
     */
    GROUP_COMMIT_MODE((short)22, "group_commit_mode"),
    MAX_FILTER_RATIO((short)23, "max_filter_ratio"),
    STORAGE_VAULT_ID((short)24, "storage_vault_id");

    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: // LOAD_ID
          return LOAD_ID;
        case 2: // TXN_ID
          return TXN_ID;
        case 3: // DB_ID
          return DB_ID;
        case 4: // TABLE_ID
          return TABLE_ID;
        case 5: // TUPLE_ID
          return TUPLE_ID;
        case 6: // NUM_REPLICAS
          return NUM_REPLICAS;
        case 7: // NEED_GEN_ROLLUP
          return NEED_GEN_ROLLUP;
        case 8: // DB_NAME
          return DB_NAME;
        case 9: // TABLE_NAME
          return TABLE_NAME;
        case 10: // SCHEMA
          return SCHEMA;
        case 11: // PARTITION
          return PARTITION;
        case 12: // LOCATION
          return LOCATION;
        case 13: // NODES_INFO
          return NODES_INFO;
        case 14: // LOAD_CHANNEL_TIMEOUT_S
          return LOAD_CHANNEL_TIMEOUT_S;
        case 15: // SEND_BATCH_PARALLELISM
          return SEND_BATCH_PARALLELISM;
        case 16: // LOAD_TO_SINGLE_TABLET
          return LOAD_TO_SINGLE_TABLET;
        case 17: // WRITE_SINGLE_REPLICA
          return WRITE_SINGLE_REPLICA;
        case 18: // SLAVE_LOCATION
          return SLAVE_LOCATION;
        case 19: // TXN_TIMEOUT_S
          return TXN_TIMEOUT_S;
        case 20: // WRITE_FILE_CACHE
          return WRITE_FILE_CACHE;
        case 21: // BASE_SCHEMA_VERSION
          return BASE_SCHEMA_VERSION;
        case 22: // GROUP_COMMIT_MODE
          return GROUP_COMMIT_MODE;
        case 23: // MAX_FILTER_RATIO
          return MAX_FILTER_RATIO;
        case 24: // STORAGE_VAULT_ID
          return STORAGE_VAULT_ID;
        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 __TXN_ID_ISSET_ID = 0;
  private static final int __DB_ID_ISSET_ID = 1;
  private static final int __TABLE_ID_ISSET_ID = 2;
  private static final int __TUPLE_ID_ISSET_ID = 3;
  private static final int __NUM_REPLICAS_ISSET_ID = 4;
  private static final int __NEED_GEN_ROLLUP_ISSET_ID = 5;
  private static final int __LOAD_CHANNEL_TIMEOUT_S_ISSET_ID = 6;
  private static final int __SEND_BATCH_PARALLELISM_ISSET_ID = 7;
  private static final int __LOAD_TO_SINGLE_TABLET_ISSET_ID = 8;
  private static final int __WRITE_SINGLE_REPLICA_ISSET_ID = 9;
  private static final int __TXN_TIMEOUT_S_ISSET_ID = 10;
  private static final int __WRITE_FILE_CACHE_ISSET_ID = 11;
  private static final int __BASE_SCHEMA_VERSION_ISSET_ID = 12;
  private static final int __MAX_FILTER_RATIO_ISSET_ID = 13;
  private short __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.DB_NAME,_Fields.TABLE_NAME,_Fields.LOAD_CHANNEL_TIMEOUT_S,_Fields.SEND_BATCH_PARALLELISM,_Fields.LOAD_TO_SINGLE_TABLET,_Fields.WRITE_SINGLE_REPLICA,_Fields.SLAVE_LOCATION,_Fields.TXN_TIMEOUT_S,_Fields.WRITE_FILE_CACHE,_Fields.BASE_SCHEMA_VERSION,_Fields.GROUP_COMMIT_MODE,_Fields.MAX_FILTER_RATIO,_Fields.STORAGE_VAULT_ID};
  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.LOAD_ID, new org.apache.thrift.meta_data.FieldMetaData("load_id", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TUniqueId.class)));
    tmpMap.put(_Fields.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txn_id", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.DB_ID, new org.apache.thrift.meta_data.FieldMetaData("db_id", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("table_id", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    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)));
    tmpMap.put(_Fields.NUM_REPLICAS, new org.apache.thrift.meta_data.FieldMetaData("num_replicas", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.NEED_GEN_ROLLUP, new org.apache.thrift.meta_data.FieldMetaData("need_gen_rollup", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    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.SCHEMA, new org.apache.thrift.meta_data.FieldMetaData("schema", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TOlapTableSchemaParam.class)));
    tmpMap.put(_Fields.PARTITION, new org.apache.thrift.meta_data.FieldMetaData("partition", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TOlapTablePartitionParam.class)));
    tmpMap.put(_Fields.LOCATION, new org.apache.thrift.meta_data.FieldMetaData("location", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TOlapTableLocationParam.class)));
    tmpMap.put(_Fields.NODES_INFO, new org.apache.thrift.meta_data.FieldMetaData("nodes_info", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TPaloNodesInfo.class)));
    tmpMap.put(_Fields.LOAD_CHANNEL_TIMEOUT_S, new org.apache.thrift.meta_data.FieldMetaData("load_channel_timeout_s", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.SEND_BATCH_PARALLELISM, new org.apache.thrift.meta_data.FieldMetaData("send_batch_parallelism", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.LOAD_TO_SINGLE_TABLET, new org.apache.thrift.meta_data.FieldMetaData("load_to_single_tablet", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.WRITE_SINGLE_REPLICA, new org.apache.thrift.meta_data.FieldMetaData("write_single_replica", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.SLAVE_LOCATION, new org.apache.thrift.meta_data.FieldMetaData("slave_location", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TOlapTableLocationParam.class)));
    tmpMap.put(_Fields.TXN_TIMEOUT_S, new org.apache.thrift.meta_data.FieldMetaData("txn_timeout_s", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.WRITE_FILE_CACHE, new org.apache.thrift.meta_data.FieldMetaData("write_file_cache", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.BASE_SCHEMA_VERSION, new org.apache.thrift.meta_data.FieldMetaData("base_schema_version", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.GROUP_COMMIT_MODE, new org.apache.thrift.meta_data.FieldMetaData("group_commit_mode", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TGroupCommitMode.class)));
    tmpMap.put(_Fields.MAX_FILTER_RATIO, new org.apache.thrift.meta_data.FieldMetaData("max_filter_ratio", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.STORAGE_VAULT_ID, new org.apache.thrift.meta_data.FieldMetaData("storage_vault_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TOlapTableSink.class, metaDataMap);
  }

  public TOlapTableSink() {
  }

  public TOlapTableSink(
    org.apache.doris.thrift.TUniqueId load_id,
    long txn_id,
    long db_id,
    long table_id,
    int tuple_id,
    int num_replicas,
    boolean need_gen_rollup,
    org.apache.doris.thrift.TOlapTableSchemaParam schema,
    org.apache.doris.thrift.TOlapTablePartitionParam partition,
    org.apache.doris.thrift.TOlapTableLocationParam location,
    org.apache.doris.thrift.TPaloNodesInfo nodes_info)
  {
    this();
    this.load_id = load_id;
    this.txn_id = txn_id;
    setTxnIdIsSet(true);
    this.db_id = db_id;
    setDbIdIsSet(true);
    this.table_id = table_id;
    setTableIdIsSet(true);
    this.tuple_id = tuple_id;
    setTupleIdIsSet(true);
    this.num_replicas = num_replicas;
    setNumReplicasIsSet(true);
    this.need_gen_rollup = need_gen_rollup;
    setNeedGenRollupIsSet(true);
    this.schema = schema;
    this.partition = partition;
    this.location = location;
    this.nodes_info = nodes_info;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TOlapTableSink(TOlapTableSink other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetLoadId()) {
      this.load_id = new org.apache.doris.thrift.TUniqueId(other.load_id);
    }
    this.txn_id = other.txn_id;
    this.db_id = other.db_id;
    this.table_id = other.table_id;
    this.tuple_id = other.tuple_id;
    this.num_replicas = other.num_replicas;
    this.need_gen_rollup = other.need_gen_rollup;
    if (other.isSetDbName()) {
      this.db_name = other.db_name;
    }
    if (other.isSetTableName()) {
      this.table_name = other.table_name;
    }
    if (other.isSetSchema()) {
      this.schema = new org.apache.doris.thrift.TOlapTableSchemaParam(other.schema);
    }
    if (other.isSetPartition()) {
      this.partition = new org.apache.doris.thrift.TOlapTablePartitionParam(other.partition);
    }
    if (other.isSetLocation()) {
      this.location = new org.apache.doris.thrift.TOlapTableLocationParam(other.location);
    }
    if (other.isSetNodesInfo()) {
      this.nodes_info = new org.apache.doris.thrift.TPaloNodesInfo(other.nodes_info);
    }
    this.load_channel_timeout_s = other.load_channel_timeout_s;
    this.send_batch_parallelism = other.send_batch_parallelism;
    this.load_to_single_tablet = other.load_to_single_tablet;
    this.write_single_replica = other.write_single_replica;
    if (other.isSetSlaveLocation()) {
      this.slave_location = new org.apache.doris.thrift.TOlapTableLocationParam(other.slave_location);
    }
    this.txn_timeout_s = other.txn_timeout_s;
    this.write_file_cache = other.write_file_cache;
    this.base_schema_version = other.base_schema_version;
    if (other.isSetGroupCommitMode()) {
      this.group_commit_mode = other.group_commit_mode;
    }
    this.max_filter_ratio = other.max_filter_ratio;
    if (other.isSetStorageVaultId()) {
      this.storage_vault_id = other.storage_vault_id;
    }
  }

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

  @Override
  public void clear() {
    this.load_id = null;
    setTxnIdIsSet(false);
    this.txn_id = 0;
    setDbIdIsSet(false);
    this.db_id = 0;
    setTableIdIsSet(false);
    this.table_id = 0;
    setTupleIdIsSet(false);
    this.tuple_id = 0;
    setNumReplicasIsSet(false);
    this.num_replicas = 0;
    setNeedGenRollupIsSet(false);
    this.need_gen_rollup = false;
    this.db_name = null;
    this.table_name = null;
    this.schema = null;
    this.partition = null;
    this.location = null;
    this.nodes_info = null;
    setLoadChannelTimeoutSIsSet(false);
    this.load_channel_timeout_s = 0;
    setSendBatchParallelismIsSet(false);
    this.send_batch_parallelism = 0;
    setLoadToSingleTabletIsSet(false);
    this.load_to_single_tablet = false;
    setWriteSingleReplicaIsSet(false);
    this.write_single_replica = false;
    this.slave_location = null;
    setTxnTimeoutSIsSet(false);
    this.txn_timeout_s = 0;
    setWriteFileCacheIsSet(false);
    this.write_file_cache = false;
    setBaseSchemaVersionIsSet(false);
    this.base_schema_version = 0;
    this.group_commit_mode = null;
    setMaxFilterRatioIsSet(false);
    this.max_filter_ratio = 0.0;
    this.storage_vault_id = null;
  }

  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TUniqueId getLoadId() {
    return this.load_id;
  }

  public TOlapTableSink setLoadId(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TUniqueId load_id) {
    this.load_id = load_id;
    return this;
  }

  public void unsetLoadId() {
    this.load_id = null;
  }

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

  public void setLoadIdIsSet(boolean value) {
    if (!value) {
      this.load_id = null;
    }
  }

  public long getTxnId() {
    return this.txn_id;
  }

  public TOlapTableSink setTxnId(long txn_id) {
    this.txn_id = txn_id;
    setTxnIdIsSet(true);
    return this;
  }

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

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

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

  public long getDbId() {
    return this.db_id;
  }

  public TOlapTableSink setDbId(long db_id) {
    this.db_id = db_id;
    setDbIdIsSet(true);
    return this;
  }

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

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

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

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

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

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

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

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

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

  public TOlapTableSink 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 getNumReplicas() {
    return this.num_replicas;
  }

  public TOlapTableSink setNumReplicas(int num_replicas) {
    this.num_replicas = num_replicas;
    setNumReplicasIsSet(true);
    return this;
  }

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

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

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

  public boolean isNeedGenRollup() {
    return this.need_gen_rollup;
  }

  public TOlapTableSink setNeedGenRollup(boolean need_gen_rollup) {
    this.need_gen_rollup = need_gen_rollup;
    setNeedGenRollupIsSet(true);
    return this;
  }

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

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

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

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

  public TOlapTableSink setDbName(@org.apache.thrift.annotation.Nullable java.lang.String db_name) {
    this.db_name = db_name;
    return this;
  }

  public void unsetDbName() {
    this.db_name = null;
  }

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

  public void setDbNameIsSet(boolean value) {
    if (!value) {
      this.db_name = null;
    }
  }

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

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

  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TOlapTableSchemaParam getSchema() {
    return this.schema;
  }

  public TOlapTableSink setSchema(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TOlapTableSchemaParam schema) {
    this.schema = schema;
    return this;
  }

  public void unsetSchema() {
    this.schema = null;
  }

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

  public void setSchemaIsSet(boolean value) {
    if (!value) {
      this.schema = null;
    }
  }

  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TOlapTablePartitionParam getPartition() {
    return this.partition;
  }

  public TOlapTableSink setPartition(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TOlapTablePartitionParam partition) {
    this.partition = partition;
    return this;
  }

  public void unsetPartition() {
    this.partition = null;
  }

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

  public void setPartitionIsSet(boolean value) {
    if (!value) {
      this.partition = null;
    }
  }

  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TOlapTableLocationParam getLocation() {
    return this.location;
  }

  public TOlapTableSink setLocation(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TOlapTableLocationParam location) {
    this.location = location;
    return this;
  }

  public void unsetLocation() {
    this.location = null;
  }

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

  public void setLocationIsSet(boolean value) {
    if (!value) {
      this.location = null;
    }
  }

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

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

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

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

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

  public long getLoadChannelTimeoutS() {
    return this.load_channel_timeout_s;
  }

  public TOlapTableSink setLoadChannelTimeoutS(long load_channel_timeout_s) {
    this.load_channel_timeout_s = load_channel_timeout_s;
    setLoadChannelTimeoutSIsSet(true);
    return this;
  }

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

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

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

  public int getSendBatchParallelism() {
    return this.send_batch_parallelism;
  }

  public TOlapTableSink setSendBatchParallelism(int send_batch_parallelism) {
    this.send_batch_parallelism = send_batch_parallelism;
    setSendBatchParallelismIsSet(true);
    return this;
  }

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

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

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

  public boolean isLoadToSingleTablet() {
    return this.load_to_single_tablet;
  }

  public TOlapTableSink setLoadToSingleTablet(boolean load_to_single_tablet) {
    this.load_to_single_tablet = load_to_single_tablet;
    setLoadToSingleTabletIsSet(true);
    return this;
  }

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

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

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

  public boolean isWriteSingleReplica() {
    return this.write_single_replica;
  }

  public TOlapTableSink setWriteSingleReplica(boolean write_single_replica) {
    this.write_single_replica = write_single_replica;
    setWriteSingleReplicaIsSet(true);
    return this;
  }

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

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

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

  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TOlapTableLocationParam getSlaveLocation() {
    return this.slave_location;
  }

  public TOlapTableSink setSlaveLocation(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TOlapTableLocationParam slave_location) {
    this.slave_location = slave_location;
    return this;
  }

  public void unsetSlaveLocation() {
    this.slave_location = null;
  }

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

  public void setSlaveLocationIsSet(boolean value) {
    if (!value) {
      this.slave_location = null;
    }
  }

  public long getTxnTimeoutS() {
    return this.txn_timeout_s;
  }

  public TOlapTableSink setTxnTimeoutS(long txn_timeout_s) {
    this.txn_timeout_s = txn_timeout_s;
    setTxnTimeoutSIsSet(true);
    return this;
  }

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

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

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

  public boolean isWriteFileCache() {
    return this.write_file_cache;
  }

  public TOlapTableSink setWriteFileCache(boolean write_file_cache) {
    this.write_file_cache = write_file_cache;
    setWriteFileCacheIsSet(true);
    return this;
  }

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

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

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

  public long getBaseSchemaVersion() {
    return this.base_schema_version;
  }

  public TOlapTableSink setBaseSchemaVersion(long base_schema_version) {
    this.base_schema_version = base_schema_version;
    setBaseSchemaVersionIsSet(true);
    return this;
  }

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

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

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

  /**
   * 
   * @see TGroupCommitMode
   */
  @org.apache.thrift.annotation.Nullable
  public TGroupCommitMode getGroupCommitMode() {
    return this.group_commit_mode;
  }

  /**
   * 
   * @see TGroupCommitMode
   */
  public TOlapTableSink setGroupCommitMode(@org.apache.thrift.annotation.Nullable TGroupCommitMode group_commit_mode) {
    this.group_commit_mode = group_commit_mode;
    return this;
  }

  public void unsetGroupCommitMode() {
    this.group_commit_mode = null;
  }

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

  public void setGroupCommitModeIsSet(boolean value) {
    if (!value) {
      this.group_commit_mode = null;
    }
  }

  public double getMaxFilterRatio() {
    return this.max_filter_ratio;
  }

  public TOlapTableSink setMaxFilterRatio(double max_filter_ratio) {
    this.max_filter_ratio = max_filter_ratio;
    setMaxFilterRatioIsSet(true);
    return this;
  }

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

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

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

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

  public TOlapTableSink setStorageVaultId(@org.apache.thrift.annotation.Nullable java.lang.String storage_vault_id) {
    this.storage_vault_id = storage_vault_id;
    return this;
  }

  public void unsetStorageVaultId() {
    this.storage_vault_id = null;
  }

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

  public void setStorageVaultIdIsSet(boolean value) {
    if (!value) {
      this.storage_vault_id = null;
    }
  }

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case LOAD_ID:
      if (value == null) {
        unsetLoadId();
      } else {
        setLoadId((org.apache.doris.thrift.TUniqueId)value);
      }
      break;

    case TXN_ID:
      if (value == null) {
        unsetTxnId();
      } else {
        setTxnId((java.lang.Long)value);
      }
      break;

    case DB_ID:
      if (value == null) {
        unsetDbId();
      } else {
        setDbId((java.lang.Long)value);
      }
      break;

    case TABLE_ID:
      if (value == null) {
        unsetTableId();
      } else {
        setTableId((java.lang.Long)value);
      }
      break;

    case TUPLE_ID:
      if (value == null) {
        unsetTupleId();
      } else {
        setTupleId((java.lang.Integer)value);
      }
      break;

    case NUM_REPLICAS:
      if (value == null) {
        unsetNumReplicas();
      } else {
        setNumReplicas((java.lang.Integer)value);
      }
      break;

    case NEED_GEN_ROLLUP:
      if (value == null) {
        unsetNeedGenRollup();
      } else {
        setNeedGenRollup((java.lang.Boolean)value);
      }
      break;

    case DB_NAME:
      if (value == null) {
        unsetDbName();
      } else {
        setDbName((java.lang.String)value);
      }
      break;

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

    case SCHEMA:
      if (value == null) {
        unsetSchema();
      } else {
        setSchema((org.apache.doris.thrift.TOlapTableSchemaParam)value);
      }
      break;

    case PARTITION:
      if (value == null) {
        unsetPartition();
      } else {
        setPartition((org.apache.doris.thrift.TOlapTablePartitionParam)value);
      }
      break;

    case LOCATION:
      if (value == null) {
        unsetLocation();
      } else {
        setLocation((org.apache.doris.thrift.TOlapTableLocationParam)value);
      }
      break;

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

    case LOAD_CHANNEL_TIMEOUT_S:
      if (value == null) {
        unsetLoadChannelTimeoutS();
      } else {
        setLoadChannelTimeoutS((java.lang.Long)value);
      }
      break;

    case SEND_BATCH_PARALLELISM:
      if (value == null) {
        unsetSendBatchParallelism();
      } else {
        setSendBatchParallelism((java.lang.Integer)value);
      }
      break;

    case LOAD_TO_SINGLE_TABLET:
      if (value == null) {
        unsetLoadToSingleTablet();
      } else {
        setLoadToSingleTablet((java.lang.Boolean)value);
      }
      break;

    case WRITE_SINGLE_REPLICA:
      if (value == null) {
        unsetWriteSingleReplica();
      } else {
        setWriteSingleReplica((java.lang.Boolean)value);
      }
      break;

    case SLAVE_LOCATION:
      if (value == null) {
        unsetSlaveLocation();
      } else {
        setSlaveLocation((org.apache.doris.thrift.TOlapTableLocationParam)value);
      }
      break;

    case TXN_TIMEOUT_S:
      if (value == null) {
        unsetTxnTimeoutS();
      } else {
        setTxnTimeoutS((java.lang.Long)value);
      }
      break;

    case WRITE_FILE_CACHE:
      if (value == null) {
        unsetWriteFileCache();
      } else {
        setWriteFileCache((java.lang.Boolean)value);
      }
      break;

    case BASE_SCHEMA_VERSION:
      if (value == null) {
        unsetBaseSchemaVersion();
      } else {
        setBaseSchemaVersion((java.lang.Long)value);
      }
      break;

    case GROUP_COMMIT_MODE:
      if (value == null) {
        unsetGroupCommitMode();
      } else {
        setGroupCommitMode((TGroupCommitMode)value);
      }
      break;

    case MAX_FILTER_RATIO:
      if (value == null) {
        unsetMaxFilterRatio();
      } else {
        setMaxFilterRatio((java.lang.Double)value);
      }
      break;

    case STORAGE_VAULT_ID:
      if (value == null) {
        unsetStorageVaultId();
      } else {
        setStorageVaultId((java.lang.String)value);
      }
      break;

    }
  }

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

    case TXN_ID:
      return getTxnId();

    case DB_ID:
      return getDbId();

    case TABLE_ID:
      return getTableId();

    case TUPLE_ID:
      return getTupleId();

    case NUM_REPLICAS:
      return getNumReplicas();

    case NEED_GEN_ROLLUP:
      return isNeedGenRollup();

    case DB_NAME:
      return getDbName();

    case TABLE_NAME:
      return getTableName();

    case SCHEMA:
      return getSchema();

    case PARTITION:
      return getPartition();

    case LOCATION:
      return getLocation();

    case NODES_INFO:
      return getNodesInfo();

    case LOAD_CHANNEL_TIMEOUT_S:
      return getLoadChannelTimeoutS();

    case SEND_BATCH_PARALLELISM:
      return getSendBatchParallelism();

    case LOAD_TO_SINGLE_TABLET:
      return isLoadToSingleTablet();

    case WRITE_SINGLE_REPLICA:
      return isWriteSingleReplica();

    case SLAVE_LOCATION:
      return getSlaveLocation();

    case TXN_TIMEOUT_S:
      return getTxnTimeoutS();

    case WRITE_FILE_CACHE:
      return isWriteFileCache();

    case BASE_SCHEMA_VERSION:
      return getBaseSchemaVersion();

    case GROUP_COMMIT_MODE:
      return getGroupCommitMode();

    case MAX_FILTER_RATIO:
      return getMaxFilterRatio();

    case STORAGE_VAULT_ID:
      return getStorageVaultId();

    }
    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 LOAD_ID:
      return isSetLoadId();
    case TXN_ID:
      return isSetTxnId();
    case DB_ID:
      return isSetDbId();
    case TABLE_ID:
      return isSetTableId();
    case TUPLE_ID:
      return isSetTupleId();
    case NUM_REPLICAS:
      return isSetNumReplicas();
    case NEED_GEN_ROLLUP:
      return isSetNeedGenRollup();
    case DB_NAME:
      return isSetDbName();
    case TABLE_NAME:
      return isSetTableName();
    case SCHEMA:
      return isSetSchema();
    case PARTITION:
      return isSetPartition();
    case LOCATION:
      return isSetLocation();
    case NODES_INFO:
      return isSetNodesInfo();
    case LOAD_CHANNEL_TIMEOUT_S:
      return isSetLoadChannelTimeoutS();
    case SEND_BATCH_PARALLELISM:
      return isSetSendBatchParallelism();
    case LOAD_TO_SINGLE_TABLET:
      return isSetLoadToSingleTablet();
    case WRITE_SINGLE_REPLICA:
      return isSetWriteSingleReplica();
    case SLAVE_LOCATION:
      return isSetSlaveLocation();
    case TXN_TIMEOUT_S:
      return isSetTxnTimeoutS();
    case WRITE_FILE_CACHE:
      return isSetWriteFileCache();
    case BASE_SCHEMA_VERSION:
      return isSetBaseSchemaVersion();
    case GROUP_COMMIT_MODE:
      return isSetGroupCommitMode();
    case MAX_FILTER_RATIO:
      return isSetMaxFilterRatio();
    case STORAGE_VAULT_ID:
      return isSetStorageVaultId();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_load_id = true && this.isSetLoadId();
    boolean that_present_load_id = true && that.isSetLoadId();
    if (this_present_load_id || that_present_load_id) {
      if (!(this_present_load_id && that_present_load_id))
        return false;
      if (!this.load_id.equals(that.load_id))
        return false;
    }

    boolean this_present_txn_id = true;
    boolean that_present_txn_id = true;
    if (this_present_txn_id || that_present_txn_id) {
      if (!(this_present_txn_id && that_present_txn_id))
        return false;
      if (this.txn_id != that.txn_id)
        return false;
    }

    boolean this_present_db_id = true;
    boolean that_present_db_id = true;
    if (this_present_db_id || that_present_db_id) {
      if (!(this_present_db_id && that_present_db_id))
        return false;
      if (this.db_id != that.db_id)
        return false;
    }

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

    boolean this_present_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_num_replicas = true;
    boolean that_present_num_replicas = true;
    if (this_present_num_replicas || that_present_num_replicas) {
      if (!(this_present_num_replicas && that_present_num_replicas))
        return false;
      if (this.num_replicas != that.num_replicas)
        return false;
    }

    boolean this_present_need_gen_rollup = true;
    boolean that_present_need_gen_rollup = true;
    if (this_present_need_gen_rollup || that_present_need_gen_rollup) {
      if (!(this_present_need_gen_rollup && that_present_need_gen_rollup))
        return false;
      if (this.need_gen_rollup != that.need_gen_rollup)
        return false;
    }

    boolean this_present_db_name = true && this.isSetDbName();
    boolean that_present_db_name = true && that.isSetDbName();
    if (this_present_db_name || that_present_db_name) {
      if (!(this_present_db_name && that_present_db_name))
        return false;
      if (!this.db_name.equals(that.db_name))
        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_schema = true && this.isSetSchema();
    boolean that_present_schema = true && that.isSetSchema();
    if (this_present_schema || that_present_schema) {
      if (!(this_present_schema && that_present_schema))
        return false;
      if (!this.schema.equals(that.schema))
        return false;
    }

    boolean this_present_partition = true && this.isSetPartition();
    boolean that_present_partition = true && that.isSetPartition();
    if (this_present_partition || that_present_partition) {
      if (!(this_present_partition && that_present_partition))
        return false;
      if (!this.partition.equals(that.partition))
        return false;
    }

    boolean this_present_location = true && this.isSetLocation();
    boolean that_present_location = true && that.isSetLocation();
    if (this_present_location || that_present_location) {
      if (!(this_present_location && that_present_location))
        return false;
      if (!this.location.equals(that.location))
        return false;
    }

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

    boolean this_present_load_channel_timeout_s = true && this.isSetLoadChannelTimeoutS();
    boolean that_present_load_channel_timeout_s = true && that.isSetLoadChannelTimeoutS();
    if (this_present_load_channel_timeout_s || that_present_load_channel_timeout_s) {
      if (!(this_present_load_channel_timeout_s && that_present_load_channel_timeout_s))
        return false;
      if (this.load_channel_timeout_s != that.load_channel_timeout_s)
        return false;
    }

    boolean this_present_send_batch_parallelism = true && this.isSetSendBatchParallelism();
    boolean that_present_send_batch_parallelism = true && that.isSetSendBatchParallelism();
    if (this_present_send_batch_parallelism || that_present_send_batch_parallelism) {
      if (!(this_present_send_batch_parallelism && that_present_send_batch_parallelism))
        return false;
      if (this.send_batch_parallelism != that.send_batch_parallelism)
        return false;
    }

    boolean this_present_load_to_single_tablet = true && this.isSetLoadToSingleTablet();
    boolean that_present_load_to_single_tablet = true && that.isSetLoadToSingleTablet();
    if (this_present_load_to_single_tablet || that_present_load_to_single_tablet) {
      if (!(this_present_load_to_single_tablet && that_present_load_to_single_tablet))
        return false;
      if (this.load_to_single_tablet != that.load_to_single_tablet)
        return false;
    }

    boolean this_present_write_single_replica = true && this.isSetWriteSingleReplica();
    boolean that_present_write_single_replica = true && that.isSetWriteSingleReplica();
    if (this_present_write_single_replica || that_present_write_single_replica) {
      if (!(this_present_write_single_replica && that_present_write_single_replica))
        return false;
      if (this.write_single_replica != that.write_single_replica)
        return false;
    }

    boolean this_present_slave_location = true && this.isSetSlaveLocation();
    boolean that_present_slave_location = true && that.isSetSlaveLocation();
    if (this_present_slave_location || that_present_slave_location) {
      if (!(this_present_slave_location && that_present_slave_location))
        return false;
      if (!this.slave_location.equals(that.slave_location))
        return false;
    }

    boolean this_present_txn_timeout_s = true && this.isSetTxnTimeoutS();
    boolean that_present_txn_timeout_s = true && that.isSetTxnTimeoutS();
    if (this_present_txn_timeout_s || that_present_txn_timeout_s) {
      if (!(this_present_txn_timeout_s && that_present_txn_timeout_s))
        return false;
      if (this.txn_timeout_s != that.txn_timeout_s)
        return false;
    }

    boolean this_present_write_file_cache = true && this.isSetWriteFileCache();
    boolean that_present_write_file_cache = true && that.isSetWriteFileCache();
    if (this_present_write_file_cache || that_present_write_file_cache) {
      if (!(this_present_write_file_cache && that_present_write_file_cache))
        return false;
      if (this.write_file_cache != that.write_file_cache)
        return false;
    }

    boolean this_present_base_schema_version = true && this.isSetBaseSchemaVersion();
    boolean that_present_base_schema_version = true && that.isSetBaseSchemaVersion();
    if (this_present_base_schema_version || that_present_base_schema_version) {
      if (!(this_present_base_schema_version && that_present_base_schema_version))
        return false;
      if (this.base_schema_version != that.base_schema_version)
        return false;
    }

    boolean this_present_group_commit_mode = true && this.isSetGroupCommitMode();
    boolean that_present_group_commit_mode = true && that.isSetGroupCommitMode();
    if (this_present_group_commit_mode || that_present_group_commit_mode) {
      if (!(this_present_group_commit_mode && that_present_group_commit_mode))
        return false;
      if (!this.group_commit_mode.equals(that.group_commit_mode))
        return false;
    }

    boolean this_present_max_filter_ratio = true && this.isSetMaxFilterRatio();
    boolean that_present_max_filter_ratio = true && that.isSetMaxFilterRatio();
    if (this_present_max_filter_ratio || that_present_max_filter_ratio) {
      if (!(this_present_max_filter_ratio && that_present_max_filter_ratio))
        return false;
      if (this.max_filter_ratio != that.max_filter_ratio)
        return false;
    }

    boolean this_present_storage_vault_id = true && this.isSetStorageVaultId();
    boolean that_present_storage_vault_id = true && that.isSetStorageVaultId();
    if (this_present_storage_vault_id || that_present_storage_vault_id) {
      if (!(this_present_storage_vault_id && that_present_storage_vault_id))
        return false;
      if (!this.storage_vault_id.equals(that.storage_vault_id))
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetLoadId()) ? 131071 : 524287);
    if (isSetLoadId())
      hashCode = hashCode * 8191 + load_id.hashCode();

    hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(txn_id);

    hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(db_id);

    hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(table_id);

    hashCode = hashCode * 8191 + tuple_id;

    hashCode = hashCode * 8191 + num_replicas;

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

    hashCode = hashCode * 8191 + ((isSetDbName()) ? 131071 : 524287);
    if (isSetDbName())
      hashCode = hashCode * 8191 + db_name.hashCode();

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

    hashCode = hashCode * 8191 + ((isSetSchema()) ? 131071 : 524287);
    if (isSetSchema())
      hashCode = hashCode * 8191 + schema.hashCode();

    hashCode = hashCode * 8191 + ((isSetPartition()) ? 131071 : 524287);
    if (isSetPartition())
      hashCode = hashCode * 8191 + partition.hashCode();

    hashCode = hashCode * 8191 + ((isSetLocation()) ? 131071 : 524287);
    if (isSetLocation())
      hashCode = hashCode * 8191 + location.hashCode();

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

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

    hashCode = hashCode * 8191 + ((isSetSendBatchParallelism()) ? 131071 : 524287);
    if (isSetSendBatchParallelism())
      hashCode = hashCode * 8191 + send_batch_parallelism;

    hashCode = hashCode * 8191 + ((isSetLoadToSingleTablet()) ? 131071 : 524287);
    if (isSetLoadToSingleTablet())
      hashCode = hashCode * 8191 + ((load_to_single_tablet) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetWriteSingleReplica()) ? 131071 : 524287);
    if (isSetWriteSingleReplica())
      hashCode = hashCode * 8191 + ((write_single_replica) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetSlaveLocation()) ? 131071 : 524287);
    if (isSetSlaveLocation())
      hashCode = hashCode * 8191 + slave_location.hashCode();

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

    hashCode = hashCode * 8191 + ((isSetWriteFileCache()) ? 131071 : 524287);
    if (isSetWriteFileCache())
      hashCode = hashCode * 8191 + ((write_file_cache) ? 131071 : 524287);

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

    hashCode = hashCode * 8191 + ((isSetGroupCommitMode()) ? 131071 : 524287);
    if (isSetGroupCommitMode())
      hashCode = hashCode * 8191 + group_commit_mode.getValue();

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

    hashCode = hashCode * 8191 + ((isSetStorageVaultId()) ? 131071 : 524287);
    if (isSetStorageVaultId())
      hashCode = hashCode * 8191 + storage_vault_id.hashCode();

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetLoadId(), other.isSetLoadId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLoadId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.load_id, other.load_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTxnId(), other.isSetTxnId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTxnId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txn_id, other.txn_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetDbId(), other.isSetDbId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDbId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_id, other.db_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTableId(), other.isSetTableId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTableId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_id, other.table_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(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(isSetNumReplicas(), other.isSetNumReplicas());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNumReplicas()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_replicas, other.num_replicas);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetNeedGenRollup(), other.isSetNeedGenRollup());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNeedGenRollup()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.need_gen_rollup, other.need_gen_rollup);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetDbName(), other.isSetDbName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDbName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name);
      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(isSetSchema(), other.isSetSchema());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSchema()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schema, other.schema);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetPartition(), other.isSetPartition());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPartition()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partition, other.partition);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetLocation(), other.isSetLocation());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLocation()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.location, other.location);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetNodesInfo(), other.isSetNodesInfo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNodesInfo()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodes_info, other.nodes_info);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetLoadChannelTimeoutS(), other.isSetLoadChannelTimeoutS());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLoadChannelTimeoutS()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.load_channel_timeout_s, other.load_channel_timeout_s);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSendBatchParallelism(), other.isSetSendBatchParallelism());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSendBatchParallelism()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.send_batch_parallelism, other.send_batch_parallelism);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetLoadToSingleTablet(), other.isSetLoadToSingleTablet());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLoadToSingleTablet()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.load_to_single_tablet, other.load_to_single_tablet);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetWriteSingleReplica(), other.isSetWriteSingleReplica());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWriteSingleReplica()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.write_single_replica, other.write_single_replica);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSlaveLocation(), other.isSetSlaveLocation());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSlaveLocation()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.slave_location, other.slave_location);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTxnTimeoutS(), other.isSetTxnTimeoutS());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTxnTimeoutS()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txn_timeout_s, other.txn_timeout_s);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetWriteFileCache(), other.isSetWriteFileCache());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWriteFileCache()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.write_file_cache, other.write_file_cache);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBaseSchemaVersion(), other.isSetBaseSchemaVersion());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBaseSchemaVersion()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.base_schema_version, other.base_schema_version);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetGroupCommitMode(), other.isSetGroupCommitMode());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetGroupCommitMode()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_commit_mode, other.group_commit_mode);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetMaxFilterRatio(), other.isSetMaxFilterRatio());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMaxFilterRatio()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_filter_ratio, other.max_filter_ratio);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetStorageVaultId(), other.isSetStorageVaultId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStorageVaultId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storage_vault_id, other.storage_vault_id);
      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("TOlapTableSink(");
    boolean first = true;

    sb.append("load_id:");
    if (this.load_id == null) {
      sb.append("null");
    } else {
      sb.append(this.load_id);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("txn_id:");
    sb.append(this.txn_id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("db_id:");
    sb.append(this.db_id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("table_id:");
    sb.append(this.table_id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("tuple_id:");
    sb.append(this.tuple_id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("num_replicas:");
    sb.append(this.num_replicas);
    first = false;
    if (!first) sb.append(", ");
    sb.append("need_gen_rollup:");
    sb.append(this.need_gen_rollup);
    first = false;
    if (isSetDbName()) {
      if (!first) sb.append(", ");
      sb.append("db_name:");
      if (this.db_name == null) {
        sb.append("null");
      } else {
        sb.append(this.db_name);
      }
      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 (!first) sb.append(", ");
    sb.append("schema:");
    if (this.schema == null) {
      sb.append("null");
    } else {
      sb.append(this.schema);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("partition:");
    if (this.partition == null) {
      sb.append("null");
    } else {
      sb.append(this.partition);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("location:");
    if (this.location == null) {
      sb.append("null");
    } else {
      sb.append(this.location);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("nodes_info:");
    if (this.nodes_info == null) {
      sb.append("null");
    } else {
      sb.append(this.nodes_info);
    }
    first = false;
    if (isSetLoadChannelTimeoutS()) {
      if (!first) sb.append(", ");
      sb.append("load_channel_timeout_s:");
      sb.append(this.load_channel_timeout_s);
      first = false;
    }
    if (isSetSendBatchParallelism()) {
      if (!first) sb.append(", ");
      sb.append("send_batch_parallelism:");
      sb.append(this.send_batch_parallelism);
      first = false;
    }
    if (isSetLoadToSingleTablet()) {
      if (!first) sb.append(", ");
      sb.append("load_to_single_tablet:");
      sb.append(this.load_to_single_tablet);
      first = false;
    }
    if (isSetWriteSingleReplica()) {
      if (!first) sb.append(", ");
      sb.append("write_single_replica:");
      sb.append(this.write_single_replica);
      first = false;
    }
    if (isSetSlaveLocation()) {
      if (!first) sb.append(", ");
      sb.append("slave_location:");
      if (this.slave_location == null) {
        sb.append("null");
      } else {
        sb.append(this.slave_location);
      }
      first = false;
    }
    if (isSetTxnTimeoutS()) {
      if (!first) sb.append(", ");
      sb.append("txn_timeout_s:");
      sb.append(this.txn_timeout_s);
      first = false;
    }
    if (isSetWriteFileCache()) {
      if (!first) sb.append(", ");
      sb.append("write_file_cache:");
      sb.append(this.write_file_cache);
      first = false;
    }
    if (isSetBaseSchemaVersion()) {
      if (!first) sb.append(", ");
      sb.append("base_schema_version:");
      sb.append(this.base_schema_version);
      first = false;
    }
    if (isSetGroupCommitMode()) {
      if (!first) sb.append(", ");
      sb.append("group_commit_mode:");
      if (this.group_commit_mode == null) {
        sb.append("null");
      } else {
        sb.append(this.group_commit_mode);
      }
      first = false;
    }
    if (isSetMaxFilterRatio()) {
      if (!first) sb.append(", ");
      sb.append("max_filter_ratio:");
      sb.append(this.max_filter_ratio);
      first = false;
    }
    if (isSetStorageVaultId()) {
      if (!first) sb.append(", ");
      sb.append("storage_vault_id:");
      if (this.storage_vault_id == null) {
        sb.append("null");
      } else {
        sb.append(this.storage_vault_id);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    if (load_id == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'load_id' was not present! Struct: " + toString());
    }
    // alas, we cannot check 'txn_id' because it's a primitive and you chose the non-beans generator.
    // alas, we cannot check 'db_id' because it's a primitive and you chose the non-beans generator.
    // alas, we cannot check 'table_id' because it's a primitive and you chose the non-beans generator.
    // alas, we cannot check 'tuple_id' because it's a primitive and you chose the non-beans generator.
    // alas, we cannot check 'num_replicas' because it's a primitive and you chose the non-beans generator.
    // alas, we cannot check 'need_gen_rollup' because it's a primitive and you chose the non-beans generator.
    if (schema == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'schema' was not present! Struct: " + toString());
    }
    if (partition == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'partition' was not present! Struct: " + toString());
    }
    if (location == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'location' was not present! Struct: " + toString());
    }
    if (nodes_info == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'nodes_info' was not present! Struct: " + toString());
    }
    // check for sub-struct validity
    if (load_id != null) {
      load_id.validate();
    }
    if (schema != null) {
      schema.validate();
    }
    if (partition != null) {
      partition.validate();
    }
    if (location != null) {
      location.validate();
    }
    if (nodes_info != null) {
      nodes_info.validate();
    }
    if (slave_location != null) {
      slave_location.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 TOlapTableSinkStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TOlapTableSinkStandardScheme getScheme() {
      return new TOlapTableSinkStandardScheme();
    }
  }

  private static class TOlapTableSinkStandardScheme extends org.apache.thrift.scheme.StandardScheme<TOlapTableSink> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TOlapTableSink 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: // LOAD_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.load_id = new org.apache.doris.thrift.TUniqueId();
              struct.load_id.read(iprot);
              struct.setLoadIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // TXN_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.txn_id = iprot.readI64();
              struct.setTxnIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // DB_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.db_id = iprot.readI64();
              struct.setDbIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // TABLE_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.table_id = iprot.readI64();
              struct.setTableIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // 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 6: // NUM_REPLICAS
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.num_replicas = iprot.readI32();
              struct.setNumReplicasIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // NEED_GEN_ROLLUP
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.need_gen_rollup = iprot.readBool();
              struct.setNeedGenRollupIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // DB_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.db_name = iprot.readString();
              struct.setDbNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // 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 10: // SCHEMA
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.schema = new org.apache.doris.thrift.TOlapTableSchemaParam();
              struct.schema.read(iprot);
              struct.setSchemaIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // PARTITION
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.partition = new org.apache.doris.thrift.TOlapTablePartitionParam();
              struct.partition.read(iprot);
              struct.setPartitionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 12: // LOCATION
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.location = new org.apache.doris.thrift.TOlapTableLocationParam();
              struct.location.read(iprot);
              struct.setLocationIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 13: // NODES_INFO
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.nodes_info = new org.apache.doris.thrift.TPaloNodesInfo();
              struct.nodes_info.read(iprot);
              struct.setNodesInfoIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 14: // LOAD_CHANNEL_TIMEOUT_S
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.load_channel_timeout_s = iprot.readI64();
              struct.setLoadChannelTimeoutSIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 15: // SEND_BATCH_PARALLELISM
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.send_batch_parallelism = iprot.readI32();
              struct.setSendBatchParallelismIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 16: // LOAD_TO_SINGLE_TABLET
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.load_to_single_tablet = iprot.readBool();
              struct.setLoadToSingleTabletIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 17: // WRITE_SINGLE_REPLICA
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.write_single_replica = iprot.readBool();
              struct.setWriteSingleReplicaIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 18: // SLAVE_LOCATION
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.slave_location = new org.apache.doris.thrift.TOlapTableLocationParam();
              struct.slave_location.read(iprot);
              struct.setSlaveLocationIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 19: // TXN_TIMEOUT_S
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.txn_timeout_s = iprot.readI64();
              struct.setTxnTimeoutSIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 20: // WRITE_FILE_CACHE
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.write_file_cache = iprot.readBool();
              struct.setWriteFileCacheIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 21: // BASE_SCHEMA_VERSION
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.base_schema_version = iprot.readI64();
              struct.setBaseSchemaVersionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 22: // GROUP_COMMIT_MODE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.group_commit_mode = org.apache.doris.thrift.TGroupCommitMode.findByValue(iprot.readI32());
              struct.setGroupCommitModeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 23: // MAX_FILTER_RATIO
            if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
              struct.max_filter_ratio = iprot.readDouble();
              struct.setMaxFilterRatioIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 24: // STORAGE_VAULT_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.storage_vault_id = iprot.readString();
              struct.setStorageVaultIdIsSet(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.isSetTxnId()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'txn_id' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetDbId()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'db_id' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetTableId()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'table_id' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetTupleId()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'tuple_id' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetNumReplicas()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'num_replicas' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetNeedGenRollup()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'need_gen_rollup' was not found in serialized data! Struct: " + toString());
      }
      struct.validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.load_id != null) {
        oprot.writeFieldBegin(LOAD_ID_FIELD_DESC);
        struct.load_id.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
      oprot.writeI64(struct.txn_id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(DB_ID_FIELD_DESC);
      oprot.writeI64(struct.db_id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(TABLE_ID_FIELD_DESC);
      oprot.writeI64(struct.table_id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(TUPLE_ID_FIELD_DESC);
      oprot.writeI32(struct.tuple_id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(NUM_REPLICAS_FIELD_DESC);
      oprot.writeI32(struct.num_replicas);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(NEED_GEN_ROLLUP_FIELD_DESC);
      oprot.writeBool(struct.need_gen_rollup);
      oprot.writeFieldEnd();
      if (struct.db_name != null) {
        if (struct.isSetDbName()) {
          oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
          oprot.writeString(struct.db_name);
          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.schema != null) {
        oprot.writeFieldBegin(SCHEMA_FIELD_DESC);
        struct.schema.write(oprot);
        oprot.writeFieldEnd();
      }
      if (struct.partition != null) {
        oprot.writeFieldBegin(PARTITION_FIELD_DESC);
        struct.partition.write(oprot);
        oprot.writeFieldEnd();
      }
      if (struct.location != null) {
        oprot.writeFieldBegin(LOCATION_FIELD_DESC);
        struct.location.write(oprot);
        oprot.writeFieldEnd();
      }
      if (struct.nodes_info != null) {
        oprot.writeFieldBegin(NODES_INFO_FIELD_DESC);
        struct.nodes_info.write(oprot);
        oprot.writeFieldEnd();
      }
      if (struct.isSetLoadChannelTimeoutS()) {
        oprot.writeFieldBegin(LOAD_CHANNEL_TIMEOUT_S_FIELD_DESC);
        oprot.writeI64(struct.load_channel_timeout_s);
        oprot.writeFieldEnd();
      }
      if (struct.isSetSendBatchParallelism()) {
        oprot.writeFieldBegin(SEND_BATCH_PARALLELISM_FIELD_DESC);
        oprot.writeI32(struct.send_batch_parallelism);
        oprot.writeFieldEnd();
      }
      if (struct.isSetLoadToSingleTablet()) {
        oprot.writeFieldBegin(LOAD_TO_SINGLE_TABLET_FIELD_DESC);
        oprot.writeBool(struct.load_to_single_tablet);
        oprot.writeFieldEnd();
      }
      if (struct.isSetWriteSingleReplica()) {
        oprot.writeFieldBegin(WRITE_SINGLE_REPLICA_FIELD_DESC);
        oprot.writeBool(struct.write_single_replica);
        oprot.writeFieldEnd();
      }
      if (struct.slave_location != null) {
        if (struct.isSetSlaveLocation()) {
          oprot.writeFieldBegin(SLAVE_LOCATION_FIELD_DESC);
          struct.slave_location.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetTxnTimeoutS()) {
        oprot.writeFieldBegin(TXN_TIMEOUT_S_FIELD_DESC);
        oprot.writeI64(struct.txn_timeout_s);
        oprot.writeFieldEnd();
      }
      if (struct.isSetWriteFileCache()) {
        oprot.writeFieldBegin(WRITE_FILE_CACHE_FIELD_DESC);
        oprot.writeBool(struct.write_file_cache);
        oprot.writeFieldEnd();
      }
      if (struct.isSetBaseSchemaVersion()) {
        oprot.writeFieldBegin(BASE_SCHEMA_VERSION_FIELD_DESC);
        oprot.writeI64(struct.base_schema_version);
        oprot.writeFieldEnd();
      }
      if (struct.group_commit_mode != null) {
        if (struct.isSetGroupCommitMode()) {
          oprot.writeFieldBegin(GROUP_COMMIT_MODE_FIELD_DESC);
          oprot.writeI32(struct.group_commit_mode.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetMaxFilterRatio()) {
        oprot.writeFieldBegin(MAX_FILTER_RATIO_FIELD_DESC);
        oprot.writeDouble(struct.max_filter_ratio);
        oprot.writeFieldEnd();
      }
      if (struct.storage_vault_id != null) {
        if (struct.isSetStorageVaultId()) {
          oprot.writeFieldBegin(STORAGE_VAULT_ID_FIELD_DESC);
          oprot.writeString(struct.storage_vault_id);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TOlapTableSinkTupleScheme extends org.apache.thrift.scheme.TupleScheme<TOlapTableSink> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TOlapTableSink struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.load_id.write(oprot);
      oprot.writeI64(struct.txn_id);
      oprot.writeI64(struct.db_id);
      oprot.writeI64(struct.table_id);
      oprot.writeI32(struct.tuple_id);
      oprot.writeI32(struct.num_replicas);
      oprot.writeBool(struct.need_gen_rollup);
      struct.schema.write(oprot);
      struct.partition.write(oprot);
      struct.location.write(oprot);
      struct.nodes_info.write(oprot);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetDbName()) {
        optionals.set(0);
      }
      if (struct.isSetTableName()) {
        optionals.set(1);
      }
      if (struct.isSetLoadChannelTimeoutS()) {
        optionals.set(2);
      }
      if (struct.isSetSendBatchParallelism()) {
        optionals.set(3);
      }
      if (struct.isSetLoadToSingleTablet()) {
        optionals.set(4);
      }
      if (struct.isSetWriteSingleReplica()) {
        optionals.set(5);
      }
      if (struct.isSetSlaveLocation()) {
        optionals.set(6);
      }
      if (struct.isSetTxnTimeoutS()) {
        optionals.set(7);
      }
      if (struct.isSetWriteFileCache()) {
        optionals.set(8);
      }
      if (struct.isSetBaseSchemaVersion()) {
        optionals.set(9);
      }
      if (struct.isSetGroupCommitMode()) {
        optionals.set(10);
      }
      if (struct.isSetMaxFilterRatio()) {
        optionals.set(11);
      }
      if (struct.isSetStorageVaultId()) {
        optionals.set(12);
      }
      oprot.writeBitSet(optionals, 13);
      if (struct.isSetDbName()) {
        oprot.writeString(struct.db_name);
      }
      if (struct.isSetTableName()) {
        oprot.writeString(struct.table_name);
      }
      if (struct.isSetLoadChannelTimeoutS()) {
        oprot.writeI64(struct.load_channel_timeout_s);
      }
      if (struct.isSetSendBatchParallelism()) {
        oprot.writeI32(struct.send_batch_parallelism);
      }
      if (struct.isSetLoadToSingleTablet()) {
        oprot.writeBool(struct.load_to_single_tablet);
      }
      if (struct.isSetWriteSingleReplica()) {
        oprot.writeBool(struct.write_single_replica);
      }
      if (struct.isSetSlaveLocation()) {
        struct.slave_location.write(oprot);
      }
      if (struct.isSetTxnTimeoutS()) {
        oprot.writeI64(struct.txn_timeout_s);
      }
      if (struct.isSetWriteFileCache()) {
        oprot.writeBool(struct.write_file_cache);
      }
      if (struct.isSetBaseSchemaVersion()) {
        oprot.writeI64(struct.base_schema_version);
      }
      if (struct.isSetGroupCommitMode()) {
        oprot.writeI32(struct.group_commit_mode.getValue());
      }
      if (struct.isSetMaxFilterRatio()) {
        oprot.writeDouble(struct.max_filter_ratio);
      }
      if (struct.isSetStorageVaultId()) {
        oprot.writeString(struct.storage_vault_id);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TOlapTableSink struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.load_id = new org.apache.doris.thrift.TUniqueId();
      struct.load_id.read(iprot);
      struct.setLoadIdIsSet(true);
      struct.txn_id = iprot.readI64();
      struct.setTxnIdIsSet(true);
      struct.db_id = iprot.readI64();
      struct.setDbIdIsSet(true);
      struct.table_id = iprot.readI64();
      struct.setTableIdIsSet(true);
      struct.tuple_id = iprot.readI32();
      struct.setTupleIdIsSet(true);
      struct.num_replicas = iprot.readI32();
      struct.setNumReplicasIsSet(true);
      struct.need_gen_rollup = iprot.readBool();
      struct.setNeedGenRollupIsSet(true);
      struct.schema = new org.apache.doris.thrift.TOlapTableSchemaParam();
      struct.schema.read(iprot);
      struct.setSchemaIsSet(true);
      struct.partition = new org.apache.doris.thrift.TOlapTablePartitionParam();
      struct.partition.read(iprot);
      struct.setPartitionIsSet(true);
      struct.location = new org.apache.doris.thrift.TOlapTableLocationParam();
      struct.location.read(iprot);
      struct.setLocationIsSet(true);
      struct.nodes_info = new org.apache.doris.thrift.TPaloNodesInfo();
      struct.nodes_info.read(iprot);
      struct.setNodesInfoIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(13);
      if (incoming.get(0)) {
        struct.db_name = iprot.readString();
        struct.setDbNameIsSet(true);
      }
      if (incoming.get(1)) {
        struct.table_name = iprot.readString();
        struct.setTableNameIsSet(true);
      }
      if (incoming.get(2)) {
        struct.load_channel_timeout_s = iprot.readI64();
        struct.setLoadChannelTimeoutSIsSet(true);
      }
      if (incoming.get(3)) {
        struct.send_batch_parallelism = iprot.readI32();
        struct.setSendBatchParallelismIsSet(true);
      }
      if (incoming.get(4)) {
        struct.load_to_single_tablet = iprot.readBool();
        struct.setLoadToSingleTabletIsSet(true);
      }
      if (incoming.get(5)) {
        struct.write_single_replica = iprot.readBool();
        struct.setWriteSingleReplicaIsSet(true);
      }
      if (incoming.get(6)) {
        struct.slave_location = new org.apache.doris.thrift.TOlapTableLocationParam();
        struct.slave_location.read(iprot);
        struct.setSlaveLocationIsSet(true);
      }
      if (incoming.get(7)) {
        struct.txn_timeout_s = iprot.readI64();
        struct.setTxnTimeoutSIsSet(true);
      }
      if (incoming.get(8)) {
        struct.write_file_cache = iprot.readBool();
        struct.setWriteFileCacheIsSet(true);
      }
      if (incoming.get(9)) {
        struct.base_schema_version = iprot.readI64();
        struct.setBaseSchemaVersionIsSet(true);
      }
      if (incoming.get(10)) {
        struct.group_commit_mode = org.apache.doris.thrift.TGroupCommitMode.findByValue(iprot.readI32());
        struct.setGroupCommitModeIsSet(true);
      }
      if (incoming.get(11)) {
        struct.max_filter_ratio = iprot.readDouble();
        struct.setMaxFilterRatioIsSet(true);
      }
      if (incoming.get(12)) {
        struct.storage_vault_id = iprot.readString();
        struct.setStorageVaultIdIsSet(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();
  }
}