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

  private static final org.apache.thrift.protocol.TField CATALOG_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catalog_name", org.apache.thrift.protocol.TType.STRING, (short)1);
  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)2);
  private static final org.apache.thrift.protocol.TField TB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tb_name", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField TABLE_LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("table_location", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.MAP, (short)5);
  private static final org.apache.thrift.protocol.TField PARTITION_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("partition_keys", org.apache.thrift.protocol.TType.LIST, (short)6);
  private static final org.apache.thrift.protocol.TField BUCKET_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("bucket_keys", org.apache.thrift.protocol.TType.LIST, (short)7);
  private static final org.apache.thrift.protocol.TField BUCKET_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("bucket_num", org.apache.thrift.protocol.TType.I32, (short)8);
  private static final org.apache.thrift.protocol.TField SHUFFLE_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("shuffle_mode", org.apache.thrift.protocol.TType.I32, (short)9);
  private static final org.apache.thrift.protocol.TField COLUMN_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("column_names", org.apache.thrift.protocol.TType.LIST, (short)10);
  private static final org.apache.thrift.protocol.TField SERIALIZED_TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("serialized_table", org.apache.thrift.protocol.TType.STRING, (short)11);

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

  public @org.apache.thrift.annotation.Nullable java.lang.String catalog_name; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String db_name; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String tb_name; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String table_location; // optional
  public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> options; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> partition_keys; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> bucket_keys; // optional
  public int bucket_num; // optional
  /**
   * 
   * @see TPaimonWriteShuffleMode
   */
  public @org.apache.thrift.annotation.Nullable TPaimonWriteShuffleMode shuffle_mode; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> column_names; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String serialized_table; // 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 {
    CATALOG_NAME((short)1, "catalog_name"),
    DB_NAME((short)2, "db_name"),
    TB_NAME((short)3, "tb_name"),
    TABLE_LOCATION((short)4, "table_location"),
    OPTIONS((short)5, "options"),
    PARTITION_KEYS((short)6, "partition_keys"),
    BUCKET_KEYS((short)7, "bucket_keys"),
    BUCKET_NUM((short)8, "bucket_num"),
    /**
     * 
     * @see TPaimonWriteShuffleMode
     */
    SHUFFLE_MODE((short)9, "shuffle_mode"),
    COLUMN_NAMES((short)10, "column_names"),
    SERIALIZED_TABLE((short)11, "serialized_table");

    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: // CATALOG_NAME
          return CATALOG_NAME;
        case 2: // DB_NAME
          return DB_NAME;
        case 3: // TB_NAME
          return TB_NAME;
        case 4: // TABLE_LOCATION
          return TABLE_LOCATION;
        case 5: // OPTIONS
          return OPTIONS;
        case 6: // PARTITION_KEYS
          return PARTITION_KEYS;
        case 7: // BUCKET_KEYS
          return BUCKET_KEYS;
        case 8: // BUCKET_NUM
          return BUCKET_NUM;
        case 9: // SHUFFLE_MODE
          return SHUFFLE_MODE;
        case 10: // COLUMN_NAMES
          return COLUMN_NAMES;
        case 11: // SERIALIZED_TABLE
          return SERIALIZED_TABLE;
        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 __BUCKET_NUM_ISSET_ID = 0;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.DB_NAME,_Fields.TB_NAME,_Fields.TABLE_LOCATION,_Fields.OPTIONS,_Fields.PARTITION_KEYS,_Fields.BUCKET_KEYS,_Fields.BUCKET_NUM,_Fields.SHUFFLE_MODE,_Fields.COLUMN_NAMES,_Fields.SERIALIZED_TABLE};
  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.CATALOG_NAME, new org.apache.thrift.meta_data.FieldMetaData("catalog_name", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    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.TB_NAME, new org.apache.thrift.meta_data.FieldMetaData("tb_name", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TABLE_LOCATION, new org.apache.thrift.meta_data.FieldMetaData("table_location", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.PARTITION_KEYS, new org.apache.thrift.meta_data.FieldMetaData("partition_keys", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.BUCKET_KEYS, new org.apache.thrift.meta_data.FieldMetaData("bucket_keys", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.BUCKET_NUM, new org.apache.thrift.meta_data.FieldMetaData("bucket_num", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.SHUFFLE_MODE, new org.apache.thrift.meta_data.FieldMetaData("shuffle_mode", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TPaimonWriteShuffleMode.class)));
    tmpMap.put(_Fields.COLUMN_NAMES, new org.apache.thrift.meta_data.FieldMetaData("column_names", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.SERIALIZED_TABLE, new org.apache.thrift.meta_data.FieldMetaData("serialized_table", 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(TPaimonTableSink.class, metaDataMap);
  }

  public TPaimonTableSink() {
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TPaimonTableSink(TPaimonTableSink other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetCatalogName()) {
      this.catalog_name = other.catalog_name;
    }
    if (other.isSetDbName()) {
      this.db_name = other.db_name;
    }
    if (other.isSetTbName()) {
      this.tb_name = other.tb_name;
    }
    if (other.isSetTableLocation()) {
      this.table_location = other.table_location;
    }
    if (other.isSetOptions()) {
      java.util.Map<java.lang.String,java.lang.String> __this__options = new java.util.HashMap<java.lang.String,java.lang.String>(other.options);
      this.options = __this__options;
    }
    if (other.isSetPartitionKeys()) {
      java.util.List<java.lang.String> __this__partition_keys = new java.util.ArrayList<java.lang.String>(other.partition_keys);
      this.partition_keys = __this__partition_keys;
    }
    if (other.isSetBucketKeys()) {
      java.util.List<java.lang.String> __this__bucket_keys = new java.util.ArrayList<java.lang.String>(other.bucket_keys);
      this.bucket_keys = __this__bucket_keys;
    }
    this.bucket_num = other.bucket_num;
    if (other.isSetShuffleMode()) {
      this.shuffle_mode = other.shuffle_mode;
    }
    if (other.isSetColumnNames()) {
      java.util.List<java.lang.String> __this__column_names = new java.util.ArrayList<java.lang.String>(other.column_names);
      this.column_names = __this__column_names;
    }
    if (other.isSetSerializedTable()) {
      this.serialized_table = other.serialized_table;
    }
  }

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

  @Override
  public void clear() {
    this.catalog_name = null;
    this.db_name = null;
    this.tb_name = null;
    this.table_location = null;
    this.options = null;
    this.partition_keys = null;
    this.bucket_keys = null;
    setBucketNumIsSet(false);
    this.bucket_num = 0;
    this.shuffle_mode = null;
    this.column_names = null;
    this.serialized_table = null;
  }

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

  public TPaimonTableSink setCatalogName(@org.apache.thrift.annotation.Nullable java.lang.String catalog_name) {
    this.catalog_name = catalog_name;
    return this;
  }

  public void unsetCatalogName() {
    this.catalog_name = null;
  }

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

  public void setCatalogNameIsSet(boolean value) {
    if (!value) {
      this.catalog_name = null;
    }
  }

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

  public TPaimonTableSink 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 getTbName() {
    return this.tb_name;
  }

  public TPaimonTableSink setTbName(@org.apache.thrift.annotation.Nullable java.lang.String tb_name) {
    this.tb_name = tb_name;
    return this;
  }

  public void unsetTbName() {
    this.tb_name = null;
  }

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

  public void setTbNameIsSet(boolean value) {
    if (!value) {
      this.tb_name = null;
    }
  }

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

  public TPaimonTableSink setTableLocation(@org.apache.thrift.annotation.Nullable java.lang.String table_location) {
    this.table_location = table_location;
    return this;
  }

  public void unsetTableLocation() {
    this.table_location = null;
  }

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

  public void setTableLocationIsSet(boolean value) {
    if (!value) {
      this.table_location = null;
    }
  }

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

  public void putToOptions(java.lang.String key, java.lang.String val) {
    if (this.options == null) {
      this.options = new java.util.HashMap<java.lang.String,java.lang.String>();
    }
    this.options.put(key, val);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Map<java.lang.String,java.lang.String> getOptions() {
    return this.options;
  }

  public TPaimonTableSink setOptions(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> options) {
    this.options = options;
    return this;
  }

  public void unsetOptions() {
    this.options = null;
  }

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

  public void setOptionsIsSet(boolean value) {
    if (!value) {
      this.options = null;
    }
  }

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

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

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

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

  public TPaimonTableSink setPartitionKeys(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> partition_keys) {
    this.partition_keys = partition_keys;
    return this;
  }

  public void unsetPartitionKeys() {
    this.partition_keys = null;
  }

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

  public void setPartitionKeysIsSet(boolean value) {
    if (!value) {
      this.partition_keys = null;
    }
  }

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

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

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

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

  public TPaimonTableSink setBucketKeys(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> bucket_keys) {
    this.bucket_keys = bucket_keys;
    return this;
  }

  public void unsetBucketKeys() {
    this.bucket_keys = null;
  }

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

  public void setBucketKeysIsSet(boolean value) {
    if (!value) {
      this.bucket_keys = null;
    }
  }

  public int getBucketNum() {
    return this.bucket_num;
  }

  public TPaimonTableSink setBucketNum(int bucket_num) {
    this.bucket_num = bucket_num;
    setBucketNumIsSet(true);
    return this;
  }

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

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

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

  /**
   * 
   * @see TPaimonWriteShuffleMode
   */
  @org.apache.thrift.annotation.Nullable
  public TPaimonWriteShuffleMode getShuffleMode() {
    return this.shuffle_mode;
  }

  /**
   * 
   * @see TPaimonWriteShuffleMode
   */
  public TPaimonTableSink setShuffleMode(@org.apache.thrift.annotation.Nullable TPaimonWriteShuffleMode shuffle_mode) {
    this.shuffle_mode = shuffle_mode;
    return this;
  }

  public void unsetShuffleMode() {
    this.shuffle_mode = null;
  }

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

  public void setShuffleModeIsSet(boolean value) {
    if (!value) {
      this.shuffle_mode = null;
    }
  }

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

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

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

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

  public TPaimonTableSink setColumnNames(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> column_names) {
    this.column_names = column_names;
    return this;
  }

  public void unsetColumnNames() {
    this.column_names = null;
  }

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

  public void setColumnNamesIsSet(boolean value) {
    if (!value) {
      this.column_names = null;
    }
  }

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

  public TPaimonTableSink setSerializedTable(@org.apache.thrift.annotation.Nullable java.lang.String serialized_table) {
    this.serialized_table = serialized_table;
    return this;
  }

  public void unsetSerializedTable() {
    this.serialized_table = null;
  }

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

  public void setSerializedTableIsSet(boolean value) {
    if (!value) {
      this.serialized_table = null;
    }
  }

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case CATALOG_NAME:
      if (value == null) {
        unsetCatalogName();
      } else {
        setCatalogName((java.lang.String)value);
      }
      break;

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

    case TB_NAME:
      if (value == null) {
        unsetTbName();
      } else {
        setTbName((java.lang.String)value);
      }
      break;

    case TABLE_LOCATION:
      if (value == null) {
        unsetTableLocation();
      } else {
        setTableLocation((java.lang.String)value);
      }
      break;

    case OPTIONS:
      if (value == null) {
        unsetOptions();
      } else {
        setOptions((java.util.Map<java.lang.String,java.lang.String>)value);
      }
      break;

    case PARTITION_KEYS:
      if (value == null) {
        unsetPartitionKeys();
      } else {
        setPartitionKeys((java.util.List<java.lang.String>)value);
      }
      break;

    case BUCKET_KEYS:
      if (value == null) {
        unsetBucketKeys();
      } else {
        setBucketKeys((java.util.List<java.lang.String>)value);
      }
      break;

    case BUCKET_NUM:
      if (value == null) {
        unsetBucketNum();
      } else {
        setBucketNum((java.lang.Integer)value);
      }
      break;

    case SHUFFLE_MODE:
      if (value == null) {
        unsetShuffleMode();
      } else {
        setShuffleMode((TPaimonWriteShuffleMode)value);
      }
      break;

    case COLUMN_NAMES:
      if (value == null) {
        unsetColumnNames();
      } else {
        setColumnNames((java.util.List<java.lang.String>)value);
      }
      break;

    case SERIALIZED_TABLE:
      if (value == null) {
        unsetSerializedTable();
      } else {
        setSerializedTable((java.lang.String)value);
      }
      break;

    }
  }

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

    case DB_NAME:
      return getDbName();

    case TB_NAME:
      return getTbName();

    case TABLE_LOCATION:
      return getTableLocation();

    case OPTIONS:
      return getOptions();

    case PARTITION_KEYS:
      return getPartitionKeys();

    case BUCKET_KEYS:
      return getBucketKeys();

    case BUCKET_NUM:
      return getBucketNum();

    case SHUFFLE_MODE:
      return getShuffleMode();

    case COLUMN_NAMES:
      return getColumnNames();

    case SERIALIZED_TABLE:
      return getSerializedTable();

    }
    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 CATALOG_NAME:
      return isSetCatalogName();
    case DB_NAME:
      return isSetDbName();
    case TB_NAME:
      return isSetTbName();
    case TABLE_LOCATION:
      return isSetTableLocation();
    case OPTIONS:
      return isSetOptions();
    case PARTITION_KEYS:
      return isSetPartitionKeys();
    case BUCKET_KEYS:
      return isSetBucketKeys();
    case BUCKET_NUM:
      return isSetBucketNum();
    case SHUFFLE_MODE:
      return isSetShuffleMode();
    case COLUMN_NAMES:
      return isSetColumnNames();
    case SERIALIZED_TABLE:
      return isSetSerializedTable();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_catalog_name = true && this.isSetCatalogName();
    boolean that_present_catalog_name = true && that.isSetCatalogName();
    if (this_present_catalog_name || that_present_catalog_name) {
      if (!(this_present_catalog_name && that_present_catalog_name))
        return false;
      if (!this.catalog_name.equals(that.catalog_name))
        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_tb_name = true && this.isSetTbName();
    boolean that_present_tb_name = true && that.isSetTbName();
    if (this_present_tb_name || that_present_tb_name) {
      if (!(this_present_tb_name && that_present_tb_name))
        return false;
      if (!this.tb_name.equals(that.tb_name))
        return false;
    }

    boolean this_present_table_location = true && this.isSetTableLocation();
    boolean that_present_table_location = true && that.isSetTableLocation();
    if (this_present_table_location || that_present_table_location) {
      if (!(this_present_table_location && that_present_table_location))
        return false;
      if (!this.table_location.equals(that.table_location))
        return false;
    }

    boolean this_present_options = true && this.isSetOptions();
    boolean that_present_options = true && that.isSetOptions();
    if (this_present_options || that_present_options) {
      if (!(this_present_options && that_present_options))
        return false;
      if (!this.options.equals(that.options))
        return false;
    }

    boolean this_present_partition_keys = true && this.isSetPartitionKeys();
    boolean that_present_partition_keys = true && that.isSetPartitionKeys();
    if (this_present_partition_keys || that_present_partition_keys) {
      if (!(this_present_partition_keys && that_present_partition_keys))
        return false;
      if (!this.partition_keys.equals(that.partition_keys))
        return false;
    }

    boolean this_present_bucket_keys = true && this.isSetBucketKeys();
    boolean that_present_bucket_keys = true && that.isSetBucketKeys();
    if (this_present_bucket_keys || that_present_bucket_keys) {
      if (!(this_present_bucket_keys && that_present_bucket_keys))
        return false;
      if (!this.bucket_keys.equals(that.bucket_keys))
        return false;
    }

    boolean this_present_bucket_num = true && this.isSetBucketNum();
    boolean that_present_bucket_num = true && that.isSetBucketNum();
    if (this_present_bucket_num || that_present_bucket_num) {
      if (!(this_present_bucket_num && that_present_bucket_num))
        return false;
      if (this.bucket_num != that.bucket_num)
        return false;
    }

    boolean this_present_shuffle_mode = true && this.isSetShuffleMode();
    boolean that_present_shuffle_mode = true && that.isSetShuffleMode();
    if (this_present_shuffle_mode || that_present_shuffle_mode) {
      if (!(this_present_shuffle_mode && that_present_shuffle_mode))
        return false;
      if (!this.shuffle_mode.equals(that.shuffle_mode))
        return false;
    }

    boolean this_present_column_names = true && this.isSetColumnNames();
    boolean that_present_column_names = true && that.isSetColumnNames();
    if (this_present_column_names || that_present_column_names) {
      if (!(this_present_column_names && that_present_column_names))
        return false;
      if (!this.column_names.equals(that.column_names))
        return false;
    }

    boolean this_present_serialized_table = true && this.isSetSerializedTable();
    boolean that_present_serialized_table = true && that.isSetSerializedTable();
    if (this_present_serialized_table || that_present_serialized_table) {
      if (!(this_present_serialized_table && that_present_serialized_table))
        return false;
      if (!this.serialized_table.equals(that.serialized_table))
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetCatalogName()) ? 131071 : 524287);
    if (isSetCatalogName())
      hashCode = hashCode * 8191 + catalog_name.hashCode();

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

    hashCode = hashCode * 8191 + ((isSetTbName()) ? 131071 : 524287);
    if (isSetTbName())
      hashCode = hashCode * 8191 + tb_name.hashCode();

    hashCode = hashCode * 8191 + ((isSetTableLocation()) ? 131071 : 524287);
    if (isSetTableLocation())
      hashCode = hashCode * 8191 + table_location.hashCode();

    hashCode = hashCode * 8191 + ((isSetOptions()) ? 131071 : 524287);
    if (isSetOptions())
      hashCode = hashCode * 8191 + options.hashCode();

    hashCode = hashCode * 8191 + ((isSetPartitionKeys()) ? 131071 : 524287);
    if (isSetPartitionKeys())
      hashCode = hashCode * 8191 + partition_keys.hashCode();

    hashCode = hashCode * 8191 + ((isSetBucketKeys()) ? 131071 : 524287);
    if (isSetBucketKeys())
      hashCode = hashCode * 8191 + bucket_keys.hashCode();

    hashCode = hashCode * 8191 + ((isSetBucketNum()) ? 131071 : 524287);
    if (isSetBucketNum())
      hashCode = hashCode * 8191 + bucket_num;

    hashCode = hashCode * 8191 + ((isSetShuffleMode()) ? 131071 : 524287);
    if (isSetShuffleMode())
      hashCode = hashCode * 8191 + shuffle_mode.getValue();

    hashCode = hashCode * 8191 + ((isSetColumnNames()) ? 131071 : 524287);
    if (isSetColumnNames())
      hashCode = hashCode * 8191 + column_names.hashCode();

    hashCode = hashCode * 8191 + ((isSetSerializedTable()) ? 131071 : 524287);
    if (isSetSerializedTable())
      hashCode = hashCode * 8191 + serialized_table.hashCode();

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetCatalogName(), other.isSetCatalogName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCatalogName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalog_name, other.catalog_name);
      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(isSetTbName(), other.isSetTbName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTbName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tb_name, other.tb_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTableLocation(), other.isSetTableLocation());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTableLocation()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_location, other.table_location);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetOptions(), other.isSetOptions());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOptions()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetPartitionKeys(), other.isSetPartitionKeys());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPartitionKeys()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partition_keys, other.partition_keys);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBucketKeys(), other.isSetBucketKeys());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBucketKeys()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bucket_keys, other.bucket_keys);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBucketNum(), other.isSetBucketNum());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBucketNum()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bucket_num, other.bucket_num);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetShuffleMode(), other.isSetShuffleMode());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetShuffleMode()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shuffle_mode, other.shuffle_mode);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetColumnNames(), other.isSetColumnNames());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetColumnNames()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_names, other.column_names);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSerializedTable(), other.isSetSerializedTable());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSerializedTable()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialized_table, other.serialized_table);
      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("TPaimonTableSink(");
    boolean first = true;

    if (isSetCatalogName()) {
      sb.append("catalog_name:");
      if (this.catalog_name == null) {
        sb.append("null");
      } else {
        sb.append(this.catalog_name);
      }
      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 (isSetTbName()) {
      if (!first) sb.append(", ");
      sb.append("tb_name:");
      if (this.tb_name == null) {
        sb.append("null");
      } else {
        sb.append(this.tb_name);
      }
      first = false;
    }
    if (isSetTableLocation()) {
      if (!first) sb.append(", ");
      sb.append("table_location:");
      if (this.table_location == null) {
        sb.append("null");
      } else {
        sb.append(this.table_location);
      }
      first = false;
    }
    if (isSetOptions()) {
      if (!first) sb.append(", ");
      sb.append("options:");
      if (this.options == null) {
        sb.append("null");
      } else {
        sb.append(this.options);
      }
      first = false;
    }
    if (isSetPartitionKeys()) {
      if (!first) sb.append(", ");
      sb.append("partition_keys:");
      if (this.partition_keys == null) {
        sb.append("null");
      } else {
        sb.append(this.partition_keys);
      }
      first = false;
    }
    if (isSetBucketKeys()) {
      if (!first) sb.append(", ");
      sb.append("bucket_keys:");
      if (this.bucket_keys == null) {
        sb.append("null");
      } else {
        sb.append(this.bucket_keys);
      }
      first = false;
    }
    if (isSetBucketNum()) {
      if (!first) sb.append(", ");
      sb.append("bucket_num:");
      sb.append(this.bucket_num);
      first = false;
    }
    if (isSetShuffleMode()) {
      if (!first) sb.append(", ");
      sb.append("shuffle_mode:");
      if (this.shuffle_mode == null) {
        sb.append("null");
      } else {
        sb.append(this.shuffle_mode);
      }
      first = false;
    }
    if (isSetColumnNames()) {
      if (!first) sb.append(", ");
      sb.append("column_names:");
      if (this.column_names == null) {
        sb.append("null");
      } else {
        sb.append(this.column_names);
      }
      first = false;
    }
    if (isSetSerializedTable()) {
      if (!first) sb.append(", ");
      sb.append("serialized_table:");
      if (this.serialized_table == null) {
        sb.append("null");
      } else {
        sb.append(this.serialized_table);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // check for sub-struct validity
  }

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

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

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

  private static class TPaimonTableSinkStandardScheme extends org.apache.thrift.scheme.StandardScheme<TPaimonTableSink> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TPaimonTableSink 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: // CATALOG_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.catalog_name = iprot.readString();
              struct.setCatalogNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // 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 3: // TB_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.tb_name = iprot.readString();
              struct.setTbNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // TABLE_LOCATION
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.table_location = iprot.readString();
              struct.setTableLocationIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // OPTIONS
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map522 = iprot.readMapBegin();
                struct.options = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map522.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _key523;
                @org.apache.thrift.annotation.Nullable java.lang.String _val524;
                for (int _i525 = 0; _i525 < _map522.size; ++_i525)
                {
                  _key523 = iprot.readString();
                  _val524 = iprot.readString();
                  struct.options.put(_key523, _val524);
                }
                iprot.readMapEnd();
              }
              struct.setOptionsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // PARTITION_KEYS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list526 = iprot.readListBegin();
                struct.partition_keys = new java.util.ArrayList<java.lang.String>(_list526.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _elem527;
                for (int _i528 = 0; _i528 < _list526.size; ++_i528)
                {
                  _elem527 = iprot.readString();
                  struct.partition_keys.add(_elem527);
                }
                iprot.readListEnd();
              }
              struct.setPartitionKeysIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // BUCKET_KEYS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list529 = iprot.readListBegin();
                struct.bucket_keys = new java.util.ArrayList<java.lang.String>(_list529.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _elem530;
                for (int _i531 = 0; _i531 < _list529.size; ++_i531)
                {
                  _elem530 = iprot.readString();
                  struct.bucket_keys.add(_elem530);
                }
                iprot.readListEnd();
              }
              struct.setBucketKeysIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // BUCKET_NUM
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.bucket_num = iprot.readI32();
              struct.setBucketNumIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // SHUFFLE_MODE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.shuffle_mode = org.apache.doris.thrift.TPaimonWriteShuffleMode.findByValue(iprot.readI32());
              struct.setShuffleModeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // COLUMN_NAMES
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list532 = iprot.readListBegin();
                struct.column_names = new java.util.ArrayList<java.lang.String>(_list532.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _elem533;
                for (int _i534 = 0; _i534 < _list532.size; ++_i534)
                {
                  _elem533 = iprot.readString();
                  struct.column_names.add(_elem533);
                }
                iprot.readListEnd();
              }
              struct.setColumnNamesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // SERIALIZED_TABLE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.serialized_table = iprot.readString();
              struct.setSerializedTableIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

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

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.catalog_name != null) {
        if (struct.isSetCatalogName()) {
          oprot.writeFieldBegin(CATALOG_NAME_FIELD_DESC);
          oprot.writeString(struct.catalog_name);
          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.tb_name != null) {
        if (struct.isSetTbName()) {
          oprot.writeFieldBegin(TB_NAME_FIELD_DESC);
          oprot.writeString(struct.tb_name);
          oprot.writeFieldEnd();
        }
      }
      if (struct.table_location != null) {
        if (struct.isSetTableLocation()) {
          oprot.writeFieldBegin(TABLE_LOCATION_FIELD_DESC);
          oprot.writeString(struct.table_location);
          oprot.writeFieldEnd();
        }
      }
      if (struct.options != null) {
        if (struct.isSetOptions()) {
          oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
          {
            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.options.size()));
            for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter535 : struct.options.entrySet())
            {
              oprot.writeString(_iter535.getKey());
              oprot.writeString(_iter535.getValue());
            }
            oprot.writeMapEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.partition_keys != null) {
        if (struct.isSetPartitionKeys()) {
          oprot.writeFieldBegin(PARTITION_KEYS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partition_keys.size()));
            for (java.lang.String _iter536 : struct.partition_keys)
            {
              oprot.writeString(_iter536);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.bucket_keys != null) {
        if (struct.isSetBucketKeys()) {
          oprot.writeFieldBegin(BUCKET_KEYS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.bucket_keys.size()));
            for (java.lang.String _iter537 : struct.bucket_keys)
            {
              oprot.writeString(_iter537);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetBucketNum()) {
        oprot.writeFieldBegin(BUCKET_NUM_FIELD_DESC);
        oprot.writeI32(struct.bucket_num);
        oprot.writeFieldEnd();
      }
      if (struct.shuffle_mode != null) {
        if (struct.isSetShuffleMode()) {
          oprot.writeFieldBegin(SHUFFLE_MODE_FIELD_DESC);
          oprot.writeI32(struct.shuffle_mode.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.column_names != null) {
        if (struct.isSetColumnNames()) {
          oprot.writeFieldBegin(COLUMN_NAMES_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.column_names.size()));
            for (java.lang.String _iter538 : struct.column_names)
            {
              oprot.writeString(_iter538);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.serialized_table != null) {
        if (struct.isSetSerializedTable()) {
          oprot.writeFieldBegin(SERIALIZED_TABLE_FIELD_DESC);
          oprot.writeString(struct.serialized_table);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TPaimonTableSinkTupleScheme extends org.apache.thrift.scheme.TupleScheme<TPaimonTableSink> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TPaimonTableSink struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetCatalogName()) {
        optionals.set(0);
      }
      if (struct.isSetDbName()) {
        optionals.set(1);
      }
      if (struct.isSetTbName()) {
        optionals.set(2);
      }
      if (struct.isSetTableLocation()) {
        optionals.set(3);
      }
      if (struct.isSetOptions()) {
        optionals.set(4);
      }
      if (struct.isSetPartitionKeys()) {
        optionals.set(5);
      }
      if (struct.isSetBucketKeys()) {
        optionals.set(6);
      }
      if (struct.isSetBucketNum()) {
        optionals.set(7);
      }
      if (struct.isSetShuffleMode()) {
        optionals.set(8);
      }
      if (struct.isSetColumnNames()) {
        optionals.set(9);
      }
      if (struct.isSetSerializedTable()) {
        optionals.set(10);
      }
      oprot.writeBitSet(optionals, 11);
      if (struct.isSetCatalogName()) {
        oprot.writeString(struct.catalog_name);
      }
      if (struct.isSetDbName()) {
        oprot.writeString(struct.db_name);
      }
      if (struct.isSetTbName()) {
        oprot.writeString(struct.tb_name);
      }
      if (struct.isSetTableLocation()) {
        oprot.writeString(struct.table_location);
      }
      if (struct.isSetOptions()) {
        {
          oprot.writeI32(struct.options.size());
          for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter539 : struct.options.entrySet())
          {
            oprot.writeString(_iter539.getKey());
            oprot.writeString(_iter539.getValue());
          }
        }
      }
      if (struct.isSetPartitionKeys()) {
        {
          oprot.writeI32(struct.partition_keys.size());
          for (java.lang.String _iter540 : struct.partition_keys)
          {
            oprot.writeString(_iter540);
          }
        }
      }
      if (struct.isSetBucketKeys()) {
        {
          oprot.writeI32(struct.bucket_keys.size());
          for (java.lang.String _iter541 : struct.bucket_keys)
          {
            oprot.writeString(_iter541);
          }
        }
      }
      if (struct.isSetBucketNum()) {
        oprot.writeI32(struct.bucket_num);
      }
      if (struct.isSetShuffleMode()) {
        oprot.writeI32(struct.shuffle_mode.getValue());
      }
      if (struct.isSetColumnNames()) {
        {
          oprot.writeI32(struct.column_names.size());
          for (java.lang.String _iter542 : struct.column_names)
          {
            oprot.writeString(_iter542);
          }
        }
      }
      if (struct.isSetSerializedTable()) {
        oprot.writeString(struct.serialized_table);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TPaimonTableSink struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet incoming = iprot.readBitSet(11);
      if (incoming.get(0)) {
        struct.catalog_name = iprot.readString();
        struct.setCatalogNameIsSet(true);
      }
      if (incoming.get(1)) {
        struct.db_name = iprot.readString();
        struct.setDbNameIsSet(true);
      }
      if (incoming.get(2)) {
        struct.tb_name = iprot.readString();
        struct.setTbNameIsSet(true);
      }
      if (incoming.get(3)) {
        struct.table_location = iprot.readString();
        struct.setTableLocationIsSet(true);
      }
      if (incoming.get(4)) {
        {
          org.apache.thrift.protocol.TMap _map543 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); 
          struct.options = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map543.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _key544;
          @org.apache.thrift.annotation.Nullable java.lang.String _val545;
          for (int _i546 = 0; _i546 < _map543.size; ++_i546)
          {
            _key544 = iprot.readString();
            _val545 = iprot.readString();
            struct.options.put(_key544, _val545);
          }
        }
        struct.setOptionsIsSet(true);
      }
      if (incoming.get(5)) {
        {
          org.apache.thrift.protocol.TList _list547 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
          struct.partition_keys = new java.util.ArrayList<java.lang.String>(_list547.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _elem548;
          for (int _i549 = 0; _i549 < _list547.size; ++_i549)
          {
            _elem548 = iprot.readString();
            struct.partition_keys.add(_elem548);
          }
        }
        struct.setPartitionKeysIsSet(true);
      }
      if (incoming.get(6)) {
        {
          org.apache.thrift.protocol.TList _list550 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
          struct.bucket_keys = new java.util.ArrayList<java.lang.String>(_list550.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _elem551;
          for (int _i552 = 0; _i552 < _list550.size; ++_i552)
          {
            _elem551 = iprot.readString();
            struct.bucket_keys.add(_elem551);
          }
        }
        struct.setBucketKeysIsSet(true);
      }
      if (incoming.get(7)) {
        struct.bucket_num = iprot.readI32();
        struct.setBucketNumIsSet(true);
      }
      if (incoming.get(8)) {
        struct.shuffle_mode = org.apache.doris.thrift.TPaimonWriteShuffleMode.findByValue(iprot.readI32());
        struct.setShuffleModeIsSet(true);
      }
      if (incoming.get(9)) {
        {
          org.apache.thrift.protocol.TList _list553 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
          struct.column_names = new java.util.ArrayList<java.lang.String>(_list553.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _elem554;
          for (int _i555 = 0; _i555 < _list553.size; ++_i555)
          {
            _elem554 = iprot.readString();
            struct.column_names.add(_elem554);
          }
        }
        struct.setColumnNamesIsSet(true);
      }
      if (incoming.get(10)) {
        struct.serialized_table = iprot.readString();
        struct.setSerializedTableIsSet(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();
  }
}