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

  private static final org.apache.thrift.protocol.TField DICTIONARY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("dictionary_id", org.apache.thrift.protocol.TType.I64, (short)1);
  private static final org.apache.thrift.protocol.TField VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("version_id", org.apache.thrift.protocol.TType.I64, (short)2);
  private static final org.apache.thrift.protocol.TField DICTIONARY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dictionary_name", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField LAYOUT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("layout_type", org.apache.thrift.protocol.TType.I32, (short)4);
  private static final org.apache.thrift.protocol.TField KEY_OUTPUT_EXPR_SLOTS_FIELD_DESC = new org.apache.thrift.protocol.TField("key_output_expr_slots", org.apache.thrift.protocol.TType.LIST, (short)5);
  private static final org.apache.thrift.protocol.TField VALUE_OUTPUT_EXPR_SLOTS_FIELD_DESC = new org.apache.thrift.protocol.TField("value_output_expr_slots", org.apache.thrift.protocol.TType.LIST, (short)6);
  private static final org.apache.thrift.protocol.TField VALUE_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("value_names", org.apache.thrift.protocol.TType.LIST, (short)7);
  private static final org.apache.thrift.protocol.TField SKIP_NULL_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("skip_null_key", org.apache.thrift.protocol.TType.BOOL, (short)8);
  private static final org.apache.thrift.protocol.TField MEMORY_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("memory_limit", org.apache.thrift.protocol.TType.I64, (short)9);

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

  public long dictionary_id; // optional
  public long version_id; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String dictionary_name; // optional
  /**
   * 
   * @see TDictLayoutType
   */
  public @org.apache.thrift.annotation.Nullable TDictLayoutType layout_type; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> key_output_expr_slots; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> value_output_expr_slots; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> value_names; // optional
  public boolean skip_null_key; // optional
  public long memory_limit; // 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 {
    DICTIONARY_ID((short)1, "dictionary_id"),
    VERSION_ID((short)2, "version_id"),
    DICTIONARY_NAME((short)3, "dictionary_name"),
    /**
     * 
     * @see TDictLayoutType
     */
    LAYOUT_TYPE((short)4, "layout_type"),
    KEY_OUTPUT_EXPR_SLOTS((short)5, "key_output_expr_slots"),
    VALUE_OUTPUT_EXPR_SLOTS((short)6, "value_output_expr_slots"),
    VALUE_NAMES((short)7, "value_names"),
    SKIP_NULL_KEY((short)8, "skip_null_key"),
    MEMORY_LIMIT((short)9, "memory_limit");

    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: // DICTIONARY_ID
          return DICTIONARY_ID;
        case 2: // VERSION_ID
          return VERSION_ID;
        case 3: // DICTIONARY_NAME
          return DICTIONARY_NAME;
        case 4: // LAYOUT_TYPE
          return LAYOUT_TYPE;
        case 5: // KEY_OUTPUT_EXPR_SLOTS
          return KEY_OUTPUT_EXPR_SLOTS;
        case 6: // VALUE_OUTPUT_EXPR_SLOTS
          return VALUE_OUTPUT_EXPR_SLOTS;
        case 7: // VALUE_NAMES
          return VALUE_NAMES;
        case 8: // SKIP_NULL_KEY
          return SKIP_NULL_KEY;
        case 9: // MEMORY_LIMIT
          return MEMORY_LIMIT;
        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 __DICTIONARY_ID_ISSET_ID = 0;
  private static final int __VERSION_ID_ISSET_ID = 1;
  private static final int __SKIP_NULL_KEY_ISSET_ID = 2;
  private static final int __MEMORY_LIMIT_ISSET_ID = 3;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.DICTIONARY_ID,_Fields.VERSION_ID,_Fields.DICTIONARY_NAME,_Fields.LAYOUT_TYPE,_Fields.KEY_OUTPUT_EXPR_SLOTS,_Fields.VALUE_OUTPUT_EXPR_SLOTS,_Fields.VALUE_NAMES,_Fields.SKIP_NULL_KEY,_Fields.MEMORY_LIMIT};
  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.DICTIONARY_ID, new org.apache.thrift.meta_data.FieldMetaData("dictionary_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("version_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.DICTIONARY_NAME, new org.apache.thrift.meta_data.FieldMetaData("dictionary_name", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.LAYOUT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("layout_type", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TDictLayoutType.class)));
    tmpMap.put(_Fields.KEY_OUTPUT_EXPR_SLOTS, new org.apache.thrift.meta_data.FieldMetaData("key_output_expr_slots", 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.I64))));
    tmpMap.put(_Fields.VALUE_OUTPUT_EXPR_SLOTS, new org.apache.thrift.meta_data.FieldMetaData("value_output_expr_slots", 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.I64))));
    tmpMap.put(_Fields.VALUE_NAMES, new org.apache.thrift.meta_data.FieldMetaData("value_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.SKIP_NULL_KEY, new org.apache.thrift.meta_data.FieldMetaData("skip_null_key", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.MEMORY_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("memory_limit", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TDictionarySink.class, metaDataMap);
  }

  public TDictionarySink() {
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TDictionarySink(TDictionarySink other) {
    __isset_bitfield = other.__isset_bitfield;
    this.dictionary_id = other.dictionary_id;
    this.version_id = other.version_id;
    if (other.isSetDictionaryName()) {
      this.dictionary_name = other.dictionary_name;
    }
    if (other.isSetLayoutType()) {
      this.layout_type = other.layout_type;
    }
    if (other.isSetKeyOutputExprSlots()) {
      java.util.List<java.lang.Long> __this__key_output_expr_slots = new java.util.ArrayList<java.lang.Long>(other.key_output_expr_slots);
      this.key_output_expr_slots = __this__key_output_expr_slots;
    }
    if (other.isSetValueOutputExprSlots()) {
      java.util.List<java.lang.Long> __this__value_output_expr_slots = new java.util.ArrayList<java.lang.Long>(other.value_output_expr_slots);
      this.value_output_expr_slots = __this__value_output_expr_slots;
    }
    if (other.isSetValueNames()) {
      java.util.List<java.lang.String> __this__value_names = new java.util.ArrayList<java.lang.String>(other.value_names);
      this.value_names = __this__value_names;
    }
    this.skip_null_key = other.skip_null_key;
    this.memory_limit = other.memory_limit;
  }

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

  @Override
  public void clear() {
    setDictionaryIdIsSet(false);
    this.dictionary_id = 0;
    setVersionIdIsSet(false);
    this.version_id = 0;
    this.dictionary_name = null;
    this.layout_type = null;
    this.key_output_expr_slots = null;
    this.value_output_expr_slots = null;
    this.value_names = null;
    setSkipNullKeyIsSet(false);
    this.skip_null_key = false;
    setMemoryLimitIsSet(false);
    this.memory_limit = 0;
  }

  public long getDictionaryId() {
    return this.dictionary_id;
  }

  public TDictionarySink setDictionaryId(long dictionary_id) {
    this.dictionary_id = dictionary_id;
    setDictionaryIdIsSet(true);
    return this;
  }

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

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

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

  public long getVersionId() {
    return this.version_id;
  }

  public TDictionarySink setVersionId(long version_id) {
    this.version_id = version_id;
    setVersionIdIsSet(true);
    return this;
  }

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

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

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

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

  public TDictionarySink setDictionaryName(@org.apache.thrift.annotation.Nullable java.lang.String dictionary_name) {
    this.dictionary_name = dictionary_name;
    return this;
  }

  public void unsetDictionaryName() {
    this.dictionary_name = null;
  }

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

  public void setDictionaryNameIsSet(boolean value) {
    if (!value) {
      this.dictionary_name = null;
    }
  }

  /**
   * 
   * @see TDictLayoutType
   */
  @org.apache.thrift.annotation.Nullable
  public TDictLayoutType getLayoutType() {
    return this.layout_type;
  }

  /**
   * 
   * @see TDictLayoutType
   */
  public TDictionarySink setLayoutType(@org.apache.thrift.annotation.Nullable TDictLayoutType layout_type) {
    this.layout_type = layout_type;
    return this;
  }

  public void unsetLayoutType() {
    this.layout_type = null;
  }

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

  public void setLayoutTypeIsSet(boolean value) {
    if (!value) {
      this.layout_type = null;
    }
  }

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

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

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

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

  public TDictionarySink setKeyOutputExprSlots(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> key_output_expr_slots) {
    this.key_output_expr_slots = key_output_expr_slots;
    return this;
  }

  public void unsetKeyOutputExprSlots() {
    this.key_output_expr_slots = null;
  }

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

  public void setKeyOutputExprSlotsIsSet(boolean value) {
    if (!value) {
      this.key_output_expr_slots = null;
    }
  }

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

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

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

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

  public TDictionarySink setValueOutputExprSlots(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> value_output_expr_slots) {
    this.value_output_expr_slots = value_output_expr_slots;
    return this;
  }

  public void unsetValueOutputExprSlots() {
    this.value_output_expr_slots = null;
  }

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

  public void setValueOutputExprSlotsIsSet(boolean value) {
    if (!value) {
      this.value_output_expr_slots = null;
    }
  }

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

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

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

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

  public TDictionarySink setValueNames(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> value_names) {
    this.value_names = value_names;
    return this;
  }

  public void unsetValueNames() {
    this.value_names = null;
  }

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

  public void setValueNamesIsSet(boolean value) {
    if (!value) {
      this.value_names = null;
    }
  }

  public boolean isSkipNullKey() {
    return this.skip_null_key;
  }

  public TDictionarySink setSkipNullKey(boolean skip_null_key) {
    this.skip_null_key = skip_null_key;
    setSkipNullKeyIsSet(true);
    return this;
  }

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

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

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

  public long getMemoryLimit() {
    return this.memory_limit;
  }

  public TDictionarySink setMemoryLimit(long memory_limit) {
    this.memory_limit = memory_limit;
    setMemoryLimitIsSet(true);
    return this;
  }

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

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

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

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

    case VERSION_ID:
      if (value == null) {
        unsetVersionId();
      } else {
        setVersionId((java.lang.Long)value);
      }
      break;

    case DICTIONARY_NAME:
      if (value == null) {
        unsetDictionaryName();
      } else {
        setDictionaryName((java.lang.String)value);
      }
      break;

    case LAYOUT_TYPE:
      if (value == null) {
        unsetLayoutType();
      } else {
        setLayoutType((TDictLayoutType)value);
      }
      break;

    case KEY_OUTPUT_EXPR_SLOTS:
      if (value == null) {
        unsetKeyOutputExprSlots();
      } else {
        setKeyOutputExprSlots((java.util.List<java.lang.Long>)value);
      }
      break;

    case VALUE_OUTPUT_EXPR_SLOTS:
      if (value == null) {
        unsetValueOutputExprSlots();
      } else {
        setValueOutputExprSlots((java.util.List<java.lang.Long>)value);
      }
      break;

    case VALUE_NAMES:
      if (value == null) {
        unsetValueNames();
      } else {
        setValueNames((java.util.List<java.lang.String>)value);
      }
      break;

    case SKIP_NULL_KEY:
      if (value == null) {
        unsetSkipNullKey();
      } else {
        setSkipNullKey((java.lang.Boolean)value);
      }
      break;

    case MEMORY_LIMIT:
      if (value == null) {
        unsetMemoryLimit();
      } else {
        setMemoryLimit((java.lang.Long)value);
      }
      break;

    }
  }

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

    case VERSION_ID:
      return getVersionId();

    case DICTIONARY_NAME:
      return getDictionaryName();

    case LAYOUT_TYPE:
      return getLayoutType();

    case KEY_OUTPUT_EXPR_SLOTS:
      return getKeyOutputExprSlots();

    case VALUE_OUTPUT_EXPR_SLOTS:
      return getValueOutputExprSlots();

    case VALUE_NAMES:
      return getValueNames();

    case SKIP_NULL_KEY:
      return isSkipNullKey();

    case MEMORY_LIMIT:
      return getMemoryLimit();

    }
    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 DICTIONARY_ID:
      return isSetDictionaryId();
    case VERSION_ID:
      return isSetVersionId();
    case DICTIONARY_NAME:
      return isSetDictionaryName();
    case LAYOUT_TYPE:
      return isSetLayoutType();
    case KEY_OUTPUT_EXPR_SLOTS:
      return isSetKeyOutputExprSlots();
    case VALUE_OUTPUT_EXPR_SLOTS:
      return isSetValueOutputExprSlots();
    case VALUE_NAMES:
      return isSetValueNames();
    case SKIP_NULL_KEY:
      return isSetSkipNullKey();
    case MEMORY_LIMIT:
      return isSetMemoryLimit();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_dictionary_id = true && this.isSetDictionaryId();
    boolean that_present_dictionary_id = true && that.isSetDictionaryId();
    if (this_present_dictionary_id || that_present_dictionary_id) {
      if (!(this_present_dictionary_id && that_present_dictionary_id))
        return false;
      if (this.dictionary_id != that.dictionary_id)
        return false;
    }

    boolean this_present_version_id = true && this.isSetVersionId();
    boolean that_present_version_id = true && that.isSetVersionId();
    if (this_present_version_id || that_present_version_id) {
      if (!(this_present_version_id && that_present_version_id))
        return false;
      if (this.version_id != that.version_id)
        return false;
    }

    boolean this_present_dictionary_name = true && this.isSetDictionaryName();
    boolean that_present_dictionary_name = true && that.isSetDictionaryName();
    if (this_present_dictionary_name || that_present_dictionary_name) {
      if (!(this_present_dictionary_name && that_present_dictionary_name))
        return false;
      if (!this.dictionary_name.equals(that.dictionary_name))
        return false;
    }

    boolean this_present_layout_type = true && this.isSetLayoutType();
    boolean that_present_layout_type = true && that.isSetLayoutType();
    if (this_present_layout_type || that_present_layout_type) {
      if (!(this_present_layout_type && that_present_layout_type))
        return false;
      if (!this.layout_type.equals(that.layout_type))
        return false;
    }

    boolean this_present_key_output_expr_slots = true && this.isSetKeyOutputExprSlots();
    boolean that_present_key_output_expr_slots = true && that.isSetKeyOutputExprSlots();
    if (this_present_key_output_expr_slots || that_present_key_output_expr_slots) {
      if (!(this_present_key_output_expr_slots && that_present_key_output_expr_slots))
        return false;
      if (!this.key_output_expr_slots.equals(that.key_output_expr_slots))
        return false;
    }

    boolean this_present_value_output_expr_slots = true && this.isSetValueOutputExprSlots();
    boolean that_present_value_output_expr_slots = true && that.isSetValueOutputExprSlots();
    if (this_present_value_output_expr_slots || that_present_value_output_expr_slots) {
      if (!(this_present_value_output_expr_slots && that_present_value_output_expr_slots))
        return false;
      if (!this.value_output_expr_slots.equals(that.value_output_expr_slots))
        return false;
    }

    boolean this_present_value_names = true && this.isSetValueNames();
    boolean that_present_value_names = true && that.isSetValueNames();
    if (this_present_value_names || that_present_value_names) {
      if (!(this_present_value_names && that_present_value_names))
        return false;
      if (!this.value_names.equals(that.value_names))
        return false;
    }

    boolean this_present_skip_null_key = true && this.isSetSkipNullKey();
    boolean that_present_skip_null_key = true && that.isSetSkipNullKey();
    if (this_present_skip_null_key || that_present_skip_null_key) {
      if (!(this_present_skip_null_key && that_present_skip_null_key))
        return false;
      if (this.skip_null_key != that.skip_null_key)
        return false;
    }

    boolean this_present_memory_limit = true && this.isSetMemoryLimit();
    boolean that_present_memory_limit = true && that.isSetMemoryLimit();
    if (this_present_memory_limit || that_present_memory_limit) {
      if (!(this_present_memory_limit && that_present_memory_limit))
        return false;
      if (this.memory_limit != that.memory_limit)
        return false;
    }

    return true;
  }

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

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

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

    hashCode = hashCode * 8191 + ((isSetDictionaryName()) ? 131071 : 524287);
    if (isSetDictionaryName())
      hashCode = hashCode * 8191 + dictionary_name.hashCode();

    hashCode = hashCode * 8191 + ((isSetLayoutType()) ? 131071 : 524287);
    if (isSetLayoutType())
      hashCode = hashCode * 8191 + layout_type.getValue();

    hashCode = hashCode * 8191 + ((isSetKeyOutputExprSlots()) ? 131071 : 524287);
    if (isSetKeyOutputExprSlots())
      hashCode = hashCode * 8191 + key_output_expr_slots.hashCode();

    hashCode = hashCode * 8191 + ((isSetValueOutputExprSlots()) ? 131071 : 524287);
    if (isSetValueOutputExprSlots())
      hashCode = hashCode * 8191 + value_output_expr_slots.hashCode();

    hashCode = hashCode * 8191 + ((isSetValueNames()) ? 131071 : 524287);
    if (isSetValueNames())
      hashCode = hashCode * 8191 + value_names.hashCode();

    hashCode = hashCode * 8191 + ((isSetSkipNullKey()) ? 131071 : 524287);
    if (isSetSkipNullKey())
      hashCode = hashCode * 8191 + ((skip_null_key) ? 131071 : 524287);

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

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetDictionaryId(), other.isSetDictionaryId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDictionaryId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dictionary_id, other.dictionary_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetVersionId(), other.isSetVersionId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetVersionId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version_id, other.version_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetDictionaryName(), other.isSetDictionaryName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDictionaryName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dictionary_name, other.dictionary_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetLayoutType(), other.isSetLayoutType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLayoutType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.layout_type, other.layout_type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetKeyOutputExprSlots(), other.isSetKeyOutputExprSlots());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetKeyOutputExprSlots()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key_output_expr_slots, other.key_output_expr_slots);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetValueOutputExprSlots(), other.isSetValueOutputExprSlots());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetValueOutputExprSlots()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value_output_expr_slots, other.value_output_expr_slots);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetValueNames(), other.isSetValueNames());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetValueNames()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value_names, other.value_names);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSkipNullKey(), other.isSetSkipNullKey());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSkipNullKey()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skip_null_key, other.skip_null_key);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetMemoryLimit(), other.isSetMemoryLimit());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMemoryLimit()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.memory_limit, other.memory_limit);
      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("TDictionarySink(");
    boolean first = true;

    if (isSetDictionaryId()) {
      sb.append("dictionary_id:");
      sb.append(this.dictionary_id);
      first = false;
    }
    if (isSetVersionId()) {
      if (!first) sb.append(", ");
      sb.append("version_id:");
      sb.append(this.version_id);
      first = false;
    }
    if (isSetDictionaryName()) {
      if (!first) sb.append(", ");
      sb.append("dictionary_name:");
      if (this.dictionary_name == null) {
        sb.append("null");
      } else {
        sb.append(this.dictionary_name);
      }
      first = false;
    }
    if (isSetLayoutType()) {
      if (!first) sb.append(", ");
      sb.append("layout_type:");
      if (this.layout_type == null) {
        sb.append("null");
      } else {
        sb.append(this.layout_type);
      }
      first = false;
    }
    if (isSetKeyOutputExprSlots()) {
      if (!first) sb.append(", ");
      sb.append("key_output_expr_slots:");
      if (this.key_output_expr_slots == null) {
        sb.append("null");
      } else {
        sb.append(this.key_output_expr_slots);
      }
      first = false;
    }
    if (isSetValueOutputExprSlots()) {
      if (!first) sb.append(", ");
      sb.append("value_output_expr_slots:");
      if (this.value_output_expr_slots == null) {
        sb.append("null");
      } else {
        sb.append(this.value_output_expr_slots);
      }
      first = false;
    }
    if (isSetValueNames()) {
      if (!first) sb.append(", ");
      sb.append("value_names:");
      if (this.value_names == null) {
        sb.append("null");
      } else {
        sb.append(this.value_names);
      }
      first = false;
    }
    if (isSetSkipNullKey()) {
      if (!first) sb.append(", ");
      sb.append("skip_null_key:");
      sb.append(this.skip_null_key);
      first = false;
    }
    if (isSetMemoryLimit()) {
      if (!first) sb.append(", ");
      sb.append("memory_limit:");
      sb.append(this.memory_limit);
      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 TDictionarySinkStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TDictionarySinkStandardScheme getScheme() {
      return new TDictionarySinkStandardScheme();
    }
  }

  private static class TDictionarySinkStandardScheme extends org.apache.thrift.scheme.StandardScheme<TDictionarySink> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TDictionarySink 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: // DICTIONARY_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.dictionary_id = iprot.readI64();
              struct.setDictionaryIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // VERSION_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.version_id = iprot.readI64();
              struct.setVersionIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // DICTIONARY_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.dictionary_name = iprot.readString();
              struct.setDictionaryNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // LAYOUT_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.layout_type = org.apache.doris.thrift.TDictLayoutType.findByValue(iprot.readI32());
              struct.setLayoutTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // KEY_OUTPUT_EXPR_SLOTS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list434 = iprot.readListBegin();
                struct.key_output_expr_slots = new java.util.ArrayList<java.lang.Long>(_list434.size);
                long _elem435;
                for (int _i436 = 0; _i436 < _list434.size; ++_i436)
                {
                  _elem435 = iprot.readI64();
                  struct.key_output_expr_slots.add(_elem435);
                }
                iprot.readListEnd();
              }
              struct.setKeyOutputExprSlotsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // VALUE_OUTPUT_EXPR_SLOTS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list437 = iprot.readListBegin();
                struct.value_output_expr_slots = new java.util.ArrayList<java.lang.Long>(_list437.size);
                long _elem438;
                for (int _i439 = 0; _i439 < _list437.size; ++_i439)
                {
                  _elem438 = iprot.readI64();
                  struct.value_output_expr_slots.add(_elem438);
                }
                iprot.readListEnd();
              }
              struct.setValueOutputExprSlotsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // VALUE_NAMES
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list440 = iprot.readListBegin();
                struct.value_names = new java.util.ArrayList<java.lang.String>(_list440.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _elem441;
                for (int _i442 = 0; _i442 < _list440.size; ++_i442)
                {
                  _elem441 = iprot.readString();
                  struct.value_names.add(_elem441);
                }
                iprot.readListEnd();
              }
              struct.setValueNamesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // SKIP_NULL_KEY
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.skip_null_key = iprot.readBool();
              struct.setSkipNullKeyIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // MEMORY_LIMIT
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.memory_limit = iprot.readI64();
              struct.setMemoryLimitIsSet(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, TDictionarySink struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.isSetDictionaryId()) {
        oprot.writeFieldBegin(DICTIONARY_ID_FIELD_DESC);
        oprot.writeI64(struct.dictionary_id);
        oprot.writeFieldEnd();
      }
      if (struct.isSetVersionId()) {
        oprot.writeFieldBegin(VERSION_ID_FIELD_DESC);
        oprot.writeI64(struct.version_id);
        oprot.writeFieldEnd();
      }
      if (struct.dictionary_name != null) {
        if (struct.isSetDictionaryName()) {
          oprot.writeFieldBegin(DICTIONARY_NAME_FIELD_DESC);
          oprot.writeString(struct.dictionary_name);
          oprot.writeFieldEnd();
        }
      }
      if (struct.layout_type != null) {
        if (struct.isSetLayoutType()) {
          oprot.writeFieldBegin(LAYOUT_TYPE_FIELD_DESC);
          oprot.writeI32(struct.layout_type.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.key_output_expr_slots != null) {
        if (struct.isSetKeyOutputExprSlots()) {
          oprot.writeFieldBegin(KEY_OUTPUT_EXPR_SLOTS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.key_output_expr_slots.size()));
            for (long _iter443 : struct.key_output_expr_slots)
            {
              oprot.writeI64(_iter443);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.value_output_expr_slots != null) {
        if (struct.isSetValueOutputExprSlots()) {
          oprot.writeFieldBegin(VALUE_OUTPUT_EXPR_SLOTS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.value_output_expr_slots.size()));
            for (long _iter444 : struct.value_output_expr_slots)
            {
              oprot.writeI64(_iter444);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.value_names != null) {
        if (struct.isSetValueNames()) {
          oprot.writeFieldBegin(VALUE_NAMES_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.value_names.size()));
            for (java.lang.String _iter445 : struct.value_names)
            {
              oprot.writeString(_iter445);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetSkipNullKey()) {
        oprot.writeFieldBegin(SKIP_NULL_KEY_FIELD_DESC);
        oprot.writeBool(struct.skip_null_key);
        oprot.writeFieldEnd();
      }
      if (struct.isSetMemoryLimit()) {
        oprot.writeFieldBegin(MEMORY_LIMIT_FIELD_DESC);
        oprot.writeI64(struct.memory_limit);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TDictionarySinkTupleScheme extends org.apache.thrift.scheme.TupleScheme<TDictionarySink> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TDictionarySink 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.isSetDictionaryId()) {
        optionals.set(0);
      }
      if (struct.isSetVersionId()) {
        optionals.set(1);
      }
      if (struct.isSetDictionaryName()) {
        optionals.set(2);
      }
      if (struct.isSetLayoutType()) {
        optionals.set(3);
      }
      if (struct.isSetKeyOutputExprSlots()) {
        optionals.set(4);
      }
      if (struct.isSetValueOutputExprSlots()) {
        optionals.set(5);
      }
      if (struct.isSetValueNames()) {
        optionals.set(6);
      }
      if (struct.isSetSkipNullKey()) {
        optionals.set(7);
      }
      if (struct.isSetMemoryLimit()) {
        optionals.set(8);
      }
      oprot.writeBitSet(optionals, 9);
      if (struct.isSetDictionaryId()) {
        oprot.writeI64(struct.dictionary_id);
      }
      if (struct.isSetVersionId()) {
        oprot.writeI64(struct.version_id);
      }
      if (struct.isSetDictionaryName()) {
        oprot.writeString(struct.dictionary_name);
      }
      if (struct.isSetLayoutType()) {
        oprot.writeI32(struct.layout_type.getValue());
      }
      if (struct.isSetKeyOutputExprSlots()) {
        {
          oprot.writeI32(struct.key_output_expr_slots.size());
          for (long _iter446 : struct.key_output_expr_slots)
          {
            oprot.writeI64(_iter446);
          }
        }
      }
      if (struct.isSetValueOutputExprSlots()) {
        {
          oprot.writeI32(struct.value_output_expr_slots.size());
          for (long _iter447 : struct.value_output_expr_slots)
          {
            oprot.writeI64(_iter447);
          }
        }
      }
      if (struct.isSetValueNames()) {
        {
          oprot.writeI32(struct.value_names.size());
          for (java.lang.String _iter448 : struct.value_names)
          {
            oprot.writeString(_iter448);
          }
        }
      }
      if (struct.isSetSkipNullKey()) {
        oprot.writeBool(struct.skip_null_key);
      }
      if (struct.isSetMemoryLimit()) {
        oprot.writeI64(struct.memory_limit);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TDictionarySink struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet incoming = iprot.readBitSet(9);
      if (incoming.get(0)) {
        struct.dictionary_id = iprot.readI64();
        struct.setDictionaryIdIsSet(true);
      }
      if (incoming.get(1)) {
        struct.version_id = iprot.readI64();
        struct.setVersionIdIsSet(true);
      }
      if (incoming.get(2)) {
        struct.dictionary_name = iprot.readString();
        struct.setDictionaryNameIsSet(true);
      }
      if (incoming.get(3)) {
        struct.layout_type = org.apache.doris.thrift.TDictLayoutType.findByValue(iprot.readI32());
        struct.setLayoutTypeIsSet(true);
      }
      if (incoming.get(4)) {
        {
          org.apache.thrift.protocol.TList _list449 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
          struct.key_output_expr_slots = new java.util.ArrayList<java.lang.Long>(_list449.size);
          long _elem450;
          for (int _i451 = 0; _i451 < _list449.size; ++_i451)
          {
            _elem450 = iprot.readI64();
            struct.key_output_expr_slots.add(_elem450);
          }
        }
        struct.setKeyOutputExprSlotsIsSet(true);
      }
      if (incoming.get(5)) {
        {
          org.apache.thrift.protocol.TList _list452 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
          struct.value_output_expr_slots = new java.util.ArrayList<java.lang.Long>(_list452.size);
          long _elem453;
          for (int _i454 = 0; _i454 < _list452.size; ++_i454)
          {
            _elem453 = iprot.readI64();
            struct.value_output_expr_slots.add(_elem453);
          }
        }
        struct.setValueOutputExprSlotsIsSet(true);
      }
      if (incoming.get(6)) {
        {
          org.apache.thrift.protocol.TList _list455 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
          struct.value_names = new java.util.ArrayList<java.lang.String>(_list455.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _elem456;
          for (int _i457 = 0; _i457 < _list455.size; ++_i457)
          {
            _elem456 = iprot.readString();
            struct.value_names.add(_elem456);
          }
        }
        struct.setValueNamesIsSet(true);
      }
      if (incoming.get(7)) {
        struct.skip_null_key = iprot.readBool();
        struct.setSkipNullKeyIsSet(true);
      }
      if (incoming.get(8)) {
        struct.memory_limit = iprot.readI64();
        struct.setMemoryLimitIsSet(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();
  }
}