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

  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRUCT, (short)1);
  private static final org.apache.thrift.protocol.TField BINARY_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("binary_type", org.apache.thrift.protocol.TType.I32, (short)2);
  private static final org.apache.thrift.protocol.TField ARG_TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("arg_types", org.apache.thrift.protocol.TType.LIST, (short)3);
  private static final org.apache.thrift.protocol.TField RET_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("ret_type", org.apache.thrift.protocol.TType.STRUCT, (short)4);
  private static final org.apache.thrift.protocol.TField HAS_VAR_ARGS_FIELD_DESC = new org.apache.thrift.protocol.TField("has_var_args", org.apache.thrift.protocol.TType.BOOL, (short)5);
  private static final org.apache.thrift.protocol.TField COMMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("comment", org.apache.thrift.protocol.TType.STRING, (short)6);
  private static final org.apache.thrift.protocol.TField SIGNATURE_FIELD_DESC = new org.apache.thrift.protocol.TField("signature", org.apache.thrift.protocol.TType.STRING, (short)7);
  private static final org.apache.thrift.protocol.TField HDFS_LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("hdfs_location", org.apache.thrift.protocol.TType.STRING, (short)8);
  private static final org.apache.thrift.protocol.TField SCALAR_FN_FIELD_DESC = new org.apache.thrift.protocol.TField("scalar_fn", org.apache.thrift.protocol.TType.STRUCT, (short)9);
  private static final org.apache.thrift.protocol.TField AGGREGATE_FN_FIELD_DESC = new org.apache.thrift.protocol.TField("aggregate_fn", org.apache.thrift.protocol.TType.STRUCT, (short)10);
  private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)11);
  private static final org.apache.thrift.protocol.TField CHECKSUM_FIELD_DESC = new org.apache.thrift.protocol.TField("checksum", org.apache.thrift.protocol.TType.STRING, (short)12);
  private static final org.apache.thrift.protocol.TField VECTORIZED_FIELD_DESC = new org.apache.thrift.protocol.TField("vectorized", org.apache.thrift.protocol.TType.BOOL, (short)13);
  private static final org.apache.thrift.protocol.TField IS_UDTF_FUNCTION_FIELD_DESC = new org.apache.thrift.protocol.TField("is_udtf_function", org.apache.thrift.protocol.TType.BOOL, (short)14);
  private static final org.apache.thrift.protocol.TField IS_STATIC_LOAD_FIELD_DESC = new org.apache.thrift.protocol.TField("is_static_load", org.apache.thrift.protocol.TType.BOOL, (short)15);
  private static final org.apache.thrift.protocol.TField EXPIRATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("expiration_time", org.apache.thrift.protocol.TType.I64, (short)16);
  private static final org.apache.thrift.protocol.TField DICT_FUNCTION_FIELD_DESC = new org.apache.thrift.protocol.TField("dict_function", org.apache.thrift.protocol.TType.STRUCT, (short)17);

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

  public @org.apache.thrift.annotation.Nullable TFunctionName name; // required
  /**
   * 
   * @see TFunctionBinaryType
   */
  public @org.apache.thrift.annotation.Nullable TFunctionBinaryType binary_type; // required
  public @org.apache.thrift.annotation.Nullable java.util.List<TTypeDesc> arg_types; // required
  public @org.apache.thrift.annotation.Nullable TTypeDesc ret_type; // required
  public boolean has_var_args; // required
  public @org.apache.thrift.annotation.Nullable java.lang.String comment; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String signature; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String hdfs_location; // optional
  public @org.apache.thrift.annotation.Nullable TScalarFunction scalar_fn; // optional
  public @org.apache.thrift.annotation.Nullable TAggregateFunction aggregate_fn; // optional
  public long id; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String checksum; // optional
  public boolean vectorized; // optional
  public boolean is_udtf_function; // optional
  public boolean is_static_load; // optional
  public long expiration_time; // optional
  public @org.apache.thrift.annotation.Nullable TDictFunction dict_function; // 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 {
    NAME((short)1, "name"),
    /**
     * 
     * @see TFunctionBinaryType
     */
    BINARY_TYPE((short)2, "binary_type"),
    ARG_TYPES((short)3, "arg_types"),
    RET_TYPE((short)4, "ret_type"),
    HAS_VAR_ARGS((short)5, "has_var_args"),
    COMMENT((short)6, "comment"),
    SIGNATURE((short)7, "signature"),
    HDFS_LOCATION((short)8, "hdfs_location"),
    SCALAR_FN((short)9, "scalar_fn"),
    AGGREGATE_FN((short)10, "aggregate_fn"),
    ID((short)11, "id"),
    CHECKSUM((short)12, "checksum"),
    VECTORIZED((short)13, "vectorized"),
    IS_UDTF_FUNCTION((short)14, "is_udtf_function"),
    IS_STATIC_LOAD((short)15, "is_static_load"),
    EXPIRATION_TIME((short)16, "expiration_time"),
    DICT_FUNCTION((short)17, "dict_function");

    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: // NAME
          return NAME;
        case 2: // BINARY_TYPE
          return BINARY_TYPE;
        case 3: // ARG_TYPES
          return ARG_TYPES;
        case 4: // RET_TYPE
          return RET_TYPE;
        case 5: // HAS_VAR_ARGS
          return HAS_VAR_ARGS;
        case 6: // COMMENT
          return COMMENT;
        case 7: // SIGNATURE
          return SIGNATURE;
        case 8: // HDFS_LOCATION
          return HDFS_LOCATION;
        case 9: // SCALAR_FN
          return SCALAR_FN;
        case 10: // AGGREGATE_FN
          return AGGREGATE_FN;
        case 11: // ID
          return ID;
        case 12: // CHECKSUM
          return CHECKSUM;
        case 13: // VECTORIZED
          return VECTORIZED;
        case 14: // IS_UDTF_FUNCTION
          return IS_UDTF_FUNCTION;
        case 15: // IS_STATIC_LOAD
          return IS_STATIC_LOAD;
        case 16: // EXPIRATION_TIME
          return EXPIRATION_TIME;
        case 17: // DICT_FUNCTION
          return DICT_FUNCTION;
        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 __HAS_VAR_ARGS_ISSET_ID = 0;
  private static final int __ID_ISSET_ID = 1;
  private static final int __VECTORIZED_ISSET_ID = 2;
  private static final int __IS_UDTF_FUNCTION_ISSET_ID = 3;
  private static final int __IS_STATIC_LOAD_ISSET_ID = 4;
  private static final int __EXPIRATION_TIME_ISSET_ID = 5;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.COMMENT,_Fields.SIGNATURE,_Fields.HDFS_LOCATION,_Fields.SCALAR_FN,_Fields.AGGREGATE_FN,_Fields.ID,_Fields.CHECKSUM,_Fields.VECTORIZED,_Fields.IS_UDTF_FUNCTION,_Fields.IS_STATIC_LOAD,_Fields.EXPIRATION_TIME,_Fields.DICT_FUNCTION};
  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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TFunctionName.class)));
    tmpMap.put(_Fields.BINARY_TYPE, new org.apache.thrift.meta_data.FieldMetaData("binary_type", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TFunctionBinaryType.class)));
    tmpMap.put(_Fields.ARG_TYPES, new org.apache.thrift.meta_data.FieldMetaData("arg_types", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTypeDesc.class))));
    tmpMap.put(_Fields.RET_TYPE, new org.apache.thrift.meta_data.FieldMetaData("ret_type", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTypeDesc.class)));
    tmpMap.put(_Fields.HAS_VAR_ARGS, new org.apache.thrift.meta_data.FieldMetaData("has_var_args", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.COMMENT, new org.apache.thrift.meta_data.FieldMetaData("comment", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.SIGNATURE, new org.apache.thrift.meta_data.FieldMetaData("signature", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.HDFS_LOCATION, new org.apache.thrift.meta_data.FieldMetaData("hdfs_location", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.SCALAR_FN, new org.apache.thrift.meta_data.FieldMetaData("scalar_fn", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TScalarFunction.class)));
    tmpMap.put(_Fields.AGGREGATE_FN, new org.apache.thrift.meta_data.FieldMetaData("aggregate_fn", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAggregateFunction.class)));
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.CHECKSUM, new org.apache.thrift.meta_data.FieldMetaData("checksum", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.VECTORIZED, new org.apache.thrift.meta_data.FieldMetaData("vectorized", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.IS_UDTF_FUNCTION, new org.apache.thrift.meta_data.FieldMetaData("is_udtf_function", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.IS_STATIC_LOAD, new org.apache.thrift.meta_data.FieldMetaData("is_static_load", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.EXPIRATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("expiration_time", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.DICT_FUNCTION, new org.apache.thrift.meta_data.FieldMetaData("dict_function", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDictFunction.class)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TFunction.class, metaDataMap);
  }

  public TFunction() {
    this.vectorized = false;

    this.is_udtf_function = false;

    this.is_static_load = false;

  }

  public TFunction(
    TFunctionName name,
    TFunctionBinaryType binary_type,
    java.util.List<TTypeDesc> arg_types,
    TTypeDesc ret_type,
    boolean has_var_args)
  {
    this();
    this.name = name;
    this.binary_type = binary_type;
    this.arg_types = arg_types;
    this.ret_type = ret_type;
    this.has_var_args = has_var_args;
    setHasVarArgsIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TFunction(TFunction other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetName()) {
      this.name = new TFunctionName(other.name);
    }
    if (other.isSetBinaryType()) {
      this.binary_type = other.binary_type;
    }
    if (other.isSetArgTypes()) {
      java.util.List<TTypeDesc> __this__arg_types = new java.util.ArrayList<TTypeDesc>(other.arg_types.size());
      for (TTypeDesc other_element : other.arg_types) {
        __this__arg_types.add(new TTypeDesc(other_element));
      }
      this.arg_types = __this__arg_types;
    }
    if (other.isSetRetType()) {
      this.ret_type = new TTypeDesc(other.ret_type);
    }
    this.has_var_args = other.has_var_args;
    if (other.isSetComment()) {
      this.comment = other.comment;
    }
    if (other.isSetSignature()) {
      this.signature = other.signature;
    }
    if (other.isSetHdfsLocation()) {
      this.hdfs_location = other.hdfs_location;
    }
    if (other.isSetScalarFn()) {
      this.scalar_fn = new TScalarFunction(other.scalar_fn);
    }
    if (other.isSetAggregateFn()) {
      this.aggregate_fn = new TAggregateFunction(other.aggregate_fn);
    }
    this.id = other.id;
    if (other.isSetChecksum()) {
      this.checksum = other.checksum;
    }
    this.vectorized = other.vectorized;
    this.is_udtf_function = other.is_udtf_function;
    this.is_static_load = other.is_static_load;
    this.expiration_time = other.expiration_time;
    if (other.isSetDictFunction()) {
      this.dict_function = new TDictFunction(other.dict_function);
    }
  }

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

  @Override
  public void clear() {
    this.name = null;
    this.binary_type = null;
    this.arg_types = null;
    this.ret_type = null;
    setHasVarArgsIsSet(false);
    this.has_var_args = false;
    this.comment = null;
    this.signature = null;
    this.hdfs_location = null;
    this.scalar_fn = null;
    this.aggregate_fn = null;
    setIdIsSet(false);
    this.id = 0;
    this.checksum = null;
    this.vectorized = false;

    this.is_udtf_function = false;

    this.is_static_load = false;

    setExpirationTimeIsSet(false);
    this.expiration_time = 0;
    this.dict_function = null;
  }

  @org.apache.thrift.annotation.Nullable
  public TFunctionName getName() {
    return this.name;
  }

  public TFunction setName(@org.apache.thrift.annotation.Nullable TFunctionName name) {
    this.name = name;
    return this;
  }

  public void unsetName() {
    this.name = null;
  }

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

  public void setNameIsSet(boolean value) {
    if (!value) {
      this.name = null;
    }
  }

  /**
   * 
   * @see TFunctionBinaryType
   */
  @org.apache.thrift.annotation.Nullable
  public TFunctionBinaryType getBinaryType() {
    return this.binary_type;
  }

  /**
   * 
   * @see TFunctionBinaryType
   */
  public TFunction setBinaryType(@org.apache.thrift.annotation.Nullable TFunctionBinaryType binary_type) {
    this.binary_type = binary_type;
    return this;
  }

  public void unsetBinaryType() {
    this.binary_type = null;
  }

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

  public void setBinaryTypeIsSet(boolean value) {
    if (!value) {
      this.binary_type = null;
    }
  }

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

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<TTypeDesc> getArgTypesIterator() {
    return (this.arg_types == null) ? null : this.arg_types.iterator();
  }

  public void addToArgTypes(TTypeDesc elem) {
    if (this.arg_types == null) {
      this.arg_types = new java.util.ArrayList<TTypeDesc>();
    }
    this.arg_types.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<TTypeDesc> getArgTypes() {
    return this.arg_types;
  }

  public TFunction setArgTypes(@org.apache.thrift.annotation.Nullable java.util.List<TTypeDesc> arg_types) {
    this.arg_types = arg_types;
    return this;
  }

  public void unsetArgTypes() {
    this.arg_types = null;
  }

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

  public void setArgTypesIsSet(boolean value) {
    if (!value) {
      this.arg_types = null;
    }
  }

  @org.apache.thrift.annotation.Nullable
  public TTypeDesc getRetType() {
    return this.ret_type;
  }

  public TFunction setRetType(@org.apache.thrift.annotation.Nullable TTypeDesc ret_type) {
    this.ret_type = ret_type;
    return this;
  }

  public void unsetRetType() {
    this.ret_type = null;
  }

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

  public void setRetTypeIsSet(boolean value) {
    if (!value) {
      this.ret_type = null;
    }
  }

  public boolean isHasVarArgs() {
    return this.has_var_args;
  }

  public TFunction setHasVarArgs(boolean has_var_args) {
    this.has_var_args = has_var_args;
    setHasVarArgsIsSet(true);
    return this;
  }

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

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

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

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

  public TFunction setComment(@org.apache.thrift.annotation.Nullable java.lang.String comment) {
    this.comment = comment;
    return this;
  }

  public void unsetComment() {
    this.comment = null;
  }

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

  public void setCommentIsSet(boolean value) {
    if (!value) {
      this.comment = null;
    }
  }

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

  public TFunction setSignature(@org.apache.thrift.annotation.Nullable java.lang.String signature) {
    this.signature = signature;
    return this;
  }

  public void unsetSignature() {
    this.signature = null;
  }

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

  public void setSignatureIsSet(boolean value) {
    if (!value) {
      this.signature = null;
    }
  }

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

  public TFunction setHdfsLocation(@org.apache.thrift.annotation.Nullable java.lang.String hdfs_location) {
    this.hdfs_location = hdfs_location;
    return this;
  }

  public void unsetHdfsLocation() {
    this.hdfs_location = null;
  }

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

  public void setHdfsLocationIsSet(boolean value) {
    if (!value) {
      this.hdfs_location = null;
    }
  }

  @org.apache.thrift.annotation.Nullable
  public TScalarFunction getScalarFn() {
    return this.scalar_fn;
  }

  public TFunction setScalarFn(@org.apache.thrift.annotation.Nullable TScalarFunction scalar_fn) {
    this.scalar_fn = scalar_fn;
    return this;
  }

  public void unsetScalarFn() {
    this.scalar_fn = null;
  }

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

  public void setScalarFnIsSet(boolean value) {
    if (!value) {
      this.scalar_fn = null;
    }
  }

  @org.apache.thrift.annotation.Nullable
  public TAggregateFunction getAggregateFn() {
    return this.aggregate_fn;
  }

  public TFunction setAggregateFn(@org.apache.thrift.annotation.Nullable TAggregateFunction aggregate_fn) {
    this.aggregate_fn = aggregate_fn;
    return this;
  }

  public void unsetAggregateFn() {
    this.aggregate_fn = null;
  }

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

  public void setAggregateFnIsSet(boolean value) {
    if (!value) {
      this.aggregate_fn = null;
    }
  }

  public long getId() {
    return this.id;
  }

  public TFunction setId(long id) {
    this.id = id;
    setIdIsSet(true);
    return this;
  }

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

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

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

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

  public TFunction setChecksum(@org.apache.thrift.annotation.Nullable java.lang.String checksum) {
    this.checksum = checksum;
    return this;
  }

  public void unsetChecksum() {
    this.checksum = null;
  }

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

  public void setChecksumIsSet(boolean value) {
    if (!value) {
      this.checksum = null;
    }
  }

  public boolean isVectorized() {
    return this.vectorized;
  }

  public TFunction setVectorized(boolean vectorized) {
    this.vectorized = vectorized;
    setVectorizedIsSet(true);
    return this;
  }

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

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

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

  public boolean isIsUdtfFunction() {
    return this.is_udtf_function;
  }

  public TFunction setIsUdtfFunction(boolean is_udtf_function) {
    this.is_udtf_function = is_udtf_function;
    setIsUdtfFunctionIsSet(true);
    return this;
  }

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

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

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

  public boolean isIsStaticLoad() {
    return this.is_static_load;
  }

  public TFunction setIsStaticLoad(boolean is_static_load) {
    this.is_static_load = is_static_load;
    setIsStaticLoadIsSet(true);
    return this;
  }

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

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

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

  public long getExpirationTime() {
    return this.expiration_time;
  }

  public TFunction setExpirationTime(long expiration_time) {
    this.expiration_time = expiration_time;
    setExpirationTimeIsSet(true);
    return this;
  }

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

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

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

  @org.apache.thrift.annotation.Nullable
  public TDictFunction getDictFunction() {
    return this.dict_function;
  }

  public TFunction setDictFunction(@org.apache.thrift.annotation.Nullable TDictFunction dict_function) {
    this.dict_function = dict_function;
    return this;
  }

  public void unsetDictFunction() {
    this.dict_function = null;
  }

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

  public void setDictFunctionIsSet(boolean value) {
    if (!value) {
      this.dict_function = null;
    }
  }

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case NAME:
      if (value == null) {
        unsetName();
      } else {
        setName((TFunctionName)value);
      }
      break;

    case BINARY_TYPE:
      if (value == null) {
        unsetBinaryType();
      } else {
        setBinaryType((TFunctionBinaryType)value);
      }
      break;

    case ARG_TYPES:
      if (value == null) {
        unsetArgTypes();
      } else {
        setArgTypes((java.util.List<TTypeDesc>)value);
      }
      break;

    case RET_TYPE:
      if (value == null) {
        unsetRetType();
      } else {
        setRetType((TTypeDesc)value);
      }
      break;

    case HAS_VAR_ARGS:
      if (value == null) {
        unsetHasVarArgs();
      } else {
        setHasVarArgs((java.lang.Boolean)value);
      }
      break;

    case COMMENT:
      if (value == null) {
        unsetComment();
      } else {
        setComment((java.lang.String)value);
      }
      break;

    case SIGNATURE:
      if (value == null) {
        unsetSignature();
      } else {
        setSignature((java.lang.String)value);
      }
      break;

    case HDFS_LOCATION:
      if (value == null) {
        unsetHdfsLocation();
      } else {
        setHdfsLocation((java.lang.String)value);
      }
      break;

    case SCALAR_FN:
      if (value == null) {
        unsetScalarFn();
      } else {
        setScalarFn((TScalarFunction)value);
      }
      break;

    case AGGREGATE_FN:
      if (value == null) {
        unsetAggregateFn();
      } else {
        setAggregateFn((TAggregateFunction)value);
      }
      break;

    case ID:
      if (value == null) {
        unsetId();
      } else {
        setId((java.lang.Long)value);
      }
      break;

    case CHECKSUM:
      if (value == null) {
        unsetChecksum();
      } else {
        setChecksum((java.lang.String)value);
      }
      break;

    case VECTORIZED:
      if (value == null) {
        unsetVectorized();
      } else {
        setVectorized((java.lang.Boolean)value);
      }
      break;

    case IS_UDTF_FUNCTION:
      if (value == null) {
        unsetIsUdtfFunction();
      } else {
        setIsUdtfFunction((java.lang.Boolean)value);
      }
      break;

    case IS_STATIC_LOAD:
      if (value == null) {
        unsetIsStaticLoad();
      } else {
        setIsStaticLoad((java.lang.Boolean)value);
      }
      break;

    case EXPIRATION_TIME:
      if (value == null) {
        unsetExpirationTime();
      } else {
        setExpirationTime((java.lang.Long)value);
      }
      break;

    case DICT_FUNCTION:
      if (value == null) {
        unsetDictFunction();
      } else {
        setDictFunction((TDictFunction)value);
      }
      break;

    }
  }

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

    case BINARY_TYPE:
      return getBinaryType();

    case ARG_TYPES:
      return getArgTypes();

    case RET_TYPE:
      return getRetType();

    case HAS_VAR_ARGS:
      return isHasVarArgs();

    case COMMENT:
      return getComment();

    case SIGNATURE:
      return getSignature();

    case HDFS_LOCATION:
      return getHdfsLocation();

    case SCALAR_FN:
      return getScalarFn();

    case AGGREGATE_FN:
      return getAggregateFn();

    case ID:
      return getId();

    case CHECKSUM:
      return getChecksum();

    case VECTORIZED:
      return isVectorized();

    case IS_UDTF_FUNCTION:
      return isIsUdtfFunction();

    case IS_STATIC_LOAD:
      return isIsStaticLoad();

    case EXPIRATION_TIME:
      return getExpirationTime();

    case DICT_FUNCTION:
      return getDictFunction();

    }
    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 NAME:
      return isSetName();
    case BINARY_TYPE:
      return isSetBinaryType();
    case ARG_TYPES:
      return isSetArgTypes();
    case RET_TYPE:
      return isSetRetType();
    case HAS_VAR_ARGS:
      return isSetHasVarArgs();
    case COMMENT:
      return isSetComment();
    case SIGNATURE:
      return isSetSignature();
    case HDFS_LOCATION:
      return isSetHdfsLocation();
    case SCALAR_FN:
      return isSetScalarFn();
    case AGGREGATE_FN:
      return isSetAggregateFn();
    case ID:
      return isSetId();
    case CHECKSUM:
      return isSetChecksum();
    case VECTORIZED:
      return isSetVectorized();
    case IS_UDTF_FUNCTION:
      return isSetIsUdtfFunction();
    case IS_STATIC_LOAD:
      return isSetIsStaticLoad();
    case EXPIRATION_TIME:
      return isSetExpirationTime();
    case DICT_FUNCTION:
      return isSetDictFunction();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_name = true && this.isSetName();
    boolean that_present_name = true && that.isSetName();
    if (this_present_name || that_present_name) {
      if (!(this_present_name && that_present_name))
        return false;
      if (!this.name.equals(that.name))
        return false;
    }

    boolean this_present_binary_type = true && this.isSetBinaryType();
    boolean that_present_binary_type = true && that.isSetBinaryType();
    if (this_present_binary_type || that_present_binary_type) {
      if (!(this_present_binary_type && that_present_binary_type))
        return false;
      if (!this.binary_type.equals(that.binary_type))
        return false;
    }

    boolean this_present_arg_types = true && this.isSetArgTypes();
    boolean that_present_arg_types = true && that.isSetArgTypes();
    if (this_present_arg_types || that_present_arg_types) {
      if (!(this_present_arg_types && that_present_arg_types))
        return false;
      if (!this.arg_types.equals(that.arg_types))
        return false;
    }

    boolean this_present_ret_type = true && this.isSetRetType();
    boolean that_present_ret_type = true && that.isSetRetType();
    if (this_present_ret_type || that_present_ret_type) {
      if (!(this_present_ret_type && that_present_ret_type))
        return false;
      if (!this.ret_type.equals(that.ret_type))
        return false;
    }

    boolean this_present_has_var_args = true;
    boolean that_present_has_var_args = true;
    if (this_present_has_var_args || that_present_has_var_args) {
      if (!(this_present_has_var_args && that_present_has_var_args))
        return false;
      if (this.has_var_args != that.has_var_args)
        return false;
    }

    boolean this_present_comment = true && this.isSetComment();
    boolean that_present_comment = true && that.isSetComment();
    if (this_present_comment || that_present_comment) {
      if (!(this_present_comment && that_present_comment))
        return false;
      if (!this.comment.equals(that.comment))
        return false;
    }

    boolean this_present_signature = true && this.isSetSignature();
    boolean that_present_signature = true && that.isSetSignature();
    if (this_present_signature || that_present_signature) {
      if (!(this_present_signature && that_present_signature))
        return false;
      if (!this.signature.equals(that.signature))
        return false;
    }

    boolean this_present_hdfs_location = true && this.isSetHdfsLocation();
    boolean that_present_hdfs_location = true && that.isSetHdfsLocation();
    if (this_present_hdfs_location || that_present_hdfs_location) {
      if (!(this_present_hdfs_location && that_present_hdfs_location))
        return false;
      if (!this.hdfs_location.equals(that.hdfs_location))
        return false;
    }

    boolean this_present_scalar_fn = true && this.isSetScalarFn();
    boolean that_present_scalar_fn = true && that.isSetScalarFn();
    if (this_present_scalar_fn || that_present_scalar_fn) {
      if (!(this_present_scalar_fn && that_present_scalar_fn))
        return false;
      if (!this.scalar_fn.equals(that.scalar_fn))
        return false;
    }

    boolean this_present_aggregate_fn = true && this.isSetAggregateFn();
    boolean that_present_aggregate_fn = true && that.isSetAggregateFn();
    if (this_present_aggregate_fn || that_present_aggregate_fn) {
      if (!(this_present_aggregate_fn && that_present_aggregate_fn))
        return false;
      if (!this.aggregate_fn.equals(that.aggregate_fn))
        return false;
    }

    boolean this_present_id = true && this.isSetId();
    boolean that_present_id = true && that.isSetId();
    if (this_present_id || that_present_id) {
      if (!(this_present_id && that_present_id))
        return false;
      if (this.id != that.id)
        return false;
    }

    boolean this_present_checksum = true && this.isSetChecksum();
    boolean that_present_checksum = true && that.isSetChecksum();
    if (this_present_checksum || that_present_checksum) {
      if (!(this_present_checksum && that_present_checksum))
        return false;
      if (!this.checksum.equals(that.checksum))
        return false;
    }

    boolean this_present_vectorized = true && this.isSetVectorized();
    boolean that_present_vectorized = true && that.isSetVectorized();
    if (this_present_vectorized || that_present_vectorized) {
      if (!(this_present_vectorized && that_present_vectorized))
        return false;
      if (this.vectorized != that.vectorized)
        return false;
    }

    boolean this_present_is_udtf_function = true && this.isSetIsUdtfFunction();
    boolean that_present_is_udtf_function = true && that.isSetIsUdtfFunction();
    if (this_present_is_udtf_function || that_present_is_udtf_function) {
      if (!(this_present_is_udtf_function && that_present_is_udtf_function))
        return false;
      if (this.is_udtf_function != that.is_udtf_function)
        return false;
    }

    boolean this_present_is_static_load = true && this.isSetIsStaticLoad();
    boolean that_present_is_static_load = true && that.isSetIsStaticLoad();
    if (this_present_is_static_load || that_present_is_static_load) {
      if (!(this_present_is_static_load && that_present_is_static_load))
        return false;
      if (this.is_static_load != that.is_static_load)
        return false;
    }

    boolean this_present_expiration_time = true && this.isSetExpirationTime();
    boolean that_present_expiration_time = true && that.isSetExpirationTime();
    if (this_present_expiration_time || that_present_expiration_time) {
      if (!(this_present_expiration_time && that_present_expiration_time))
        return false;
      if (this.expiration_time != that.expiration_time)
        return false;
    }

    boolean this_present_dict_function = true && this.isSetDictFunction();
    boolean that_present_dict_function = true && that.isSetDictFunction();
    if (this_present_dict_function || that_present_dict_function) {
      if (!(this_present_dict_function && that_present_dict_function))
        return false;
      if (!this.dict_function.equals(that.dict_function))
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
    if (isSetName())
      hashCode = hashCode * 8191 + name.hashCode();

    hashCode = hashCode * 8191 + ((isSetBinaryType()) ? 131071 : 524287);
    if (isSetBinaryType())
      hashCode = hashCode * 8191 + binary_type.getValue();

    hashCode = hashCode * 8191 + ((isSetArgTypes()) ? 131071 : 524287);
    if (isSetArgTypes())
      hashCode = hashCode * 8191 + arg_types.hashCode();

    hashCode = hashCode * 8191 + ((isSetRetType()) ? 131071 : 524287);
    if (isSetRetType())
      hashCode = hashCode * 8191 + ret_type.hashCode();

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

    hashCode = hashCode * 8191 + ((isSetComment()) ? 131071 : 524287);
    if (isSetComment())
      hashCode = hashCode * 8191 + comment.hashCode();

    hashCode = hashCode * 8191 + ((isSetSignature()) ? 131071 : 524287);
    if (isSetSignature())
      hashCode = hashCode * 8191 + signature.hashCode();

    hashCode = hashCode * 8191 + ((isSetHdfsLocation()) ? 131071 : 524287);
    if (isSetHdfsLocation())
      hashCode = hashCode * 8191 + hdfs_location.hashCode();

    hashCode = hashCode * 8191 + ((isSetScalarFn()) ? 131071 : 524287);
    if (isSetScalarFn())
      hashCode = hashCode * 8191 + scalar_fn.hashCode();

    hashCode = hashCode * 8191 + ((isSetAggregateFn()) ? 131071 : 524287);
    if (isSetAggregateFn())
      hashCode = hashCode * 8191 + aggregate_fn.hashCode();

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

    hashCode = hashCode * 8191 + ((isSetChecksum()) ? 131071 : 524287);
    if (isSetChecksum())
      hashCode = hashCode * 8191 + checksum.hashCode();

    hashCode = hashCode * 8191 + ((isSetVectorized()) ? 131071 : 524287);
    if (isSetVectorized())
      hashCode = hashCode * 8191 + ((vectorized) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetIsUdtfFunction()) ? 131071 : 524287);
    if (isSetIsUdtfFunction())
      hashCode = hashCode * 8191 + ((is_udtf_function) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetIsStaticLoad()) ? 131071 : 524287);
    if (isSetIsStaticLoad())
      hashCode = hashCode * 8191 + ((is_static_load) ? 131071 : 524287);

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

    hashCode = hashCode * 8191 + ((isSetDictFunction()) ? 131071 : 524287);
    if (isSetDictFunction())
      hashCode = hashCode * 8191 + dict_function.hashCode();

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBinaryType(), other.isSetBinaryType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBinaryType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.binary_type, other.binary_type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetArgTypes(), other.isSetArgTypes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetArgTypes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.arg_types, other.arg_types);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetRetType(), other.isSetRetType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRetType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ret_type, other.ret_type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetHasVarArgs(), other.isSetHasVarArgs());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetHasVarArgs()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.has_var_args, other.has_var_args);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetComment(), other.isSetComment());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetComment()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comment, other.comment);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSignature(), other.isSetSignature());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSignature()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.signature, other.signature);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetHdfsLocation(), other.isSetHdfsLocation());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetHdfsLocation()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hdfs_location, other.hdfs_location);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetScalarFn(), other.isSetScalarFn());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetScalarFn()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scalar_fn, other.scalar_fn);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetAggregateFn(), other.isSetAggregateFn());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAggregateFn()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aggregate_fn, other.aggregate_fn);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetId(), other.isSetId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetChecksum(), other.isSetChecksum());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetChecksum()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.checksum, other.checksum);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetVectorized(), other.isSetVectorized());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetVectorized()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vectorized, other.vectorized);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIsUdtfFunction(), other.isSetIsUdtfFunction());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsUdtfFunction()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_udtf_function, other.is_udtf_function);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIsStaticLoad(), other.isSetIsStaticLoad());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsStaticLoad()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_static_load, other.is_static_load);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetExpirationTime(), other.isSetExpirationTime());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetExpirationTime()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expiration_time, other.expiration_time);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetDictFunction(), other.isSetDictFunction());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDictFunction()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dict_function, other.dict_function);
      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("TFunction(");
    boolean first = true;

    sb.append("name:");
    if (this.name == null) {
      sb.append("null");
    } else {
      sb.append(this.name);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("binary_type:");
    if (this.binary_type == null) {
      sb.append("null");
    } else {
      sb.append(this.binary_type);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("arg_types:");
    if (this.arg_types == null) {
      sb.append("null");
    } else {
      sb.append(this.arg_types);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("ret_type:");
    if (this.ret_type == null) {
      sb.append("null");
    } else {
      sb.append(this.ret_type);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("has_var_args:");
    sb.append(this.has_var_args);
    first = false;
    if (isSetComment()) {
      if (!first) sb.append(", ");
      sb.append("comment:");
      if (this.comment == null) {
        sb.append("null");
      } else {
        sb.append(this.comment);
      }
      first = false;
    }
    if (isSetSignature()) {
      if (!first) sb.append(", ");
      sb.append("signature:");
      if (this.signature == null) {
        sb.append("null");
      } else {
        sb.append(this.signature);
      }
      first = false;
    }
    if (isSetHdfsLocation()) {
      if (!first) sb.append(", ");
      sb.append("hdfs_location:");
      if (this.hdfs_location == null) {
        sb.append("null");
      } else {
        sb.append(this.hdfs_location);
      }
      first = false;
    }
    if (isSetScalarFn()) {
      if (!first) sb.append(", ");
      sb.append("scalar_fn:");
      if (this.scalar_fn == null) {
        sb.append("null");
      } else {
        sb.append(this.scalar_fn);
      }
      first = false;
    }
    if (isSetAggregateFn()) {
      if (!first) sb.append(", ");
      sb.append("aggregate_fn:");
      if (this.aggregate_fn == null) {
        sb.append("null");
      } else {
        sb.append(this.aggregate_fn);
      }
      first = false;
    }
    if (isSetId()) {
      if (!first) sb.append(", ");
      sb.append("id:");
      sb.append(this.id);
      first = false;
    }
    if (isSetChecksum()) {
      if (!first) sb.append(", ");
      sb.append("checksum:");
      if (this.checksum == null) {
        sb.append("null");
      } else {
        sb.append(this.checksum);
      }
      first = false;
    }
    if (isSetVectorized()) {
      if (!first) sb.append(", ");
      sb.append("vectorized:");
      sb.append(this.vectorized);
      first = false;
    }
    if (isSetIsUdtfFunction()) {
      if (!first) sb.append(", ");
      sb.append("is_udtf_function:");
      sb.append(this.is_udtf_function);
      first = false;
    }
    if (isSetIsStaticLoad()) {
      if (!first) sb.append(", ");
      sb.append("is_static_load:");
      sb.append(this.is_static_load);
      first = false;
    }
    if (isSetExpirationTime()) {
      if (!first) sb.append(", ");
      sb.append("expiration_time:");
      sb.append(this.expiration_time);
      first = false;
    }
    if (isSetDictFunction()) {
      if (!first) sb.append(", ");
      sb.append("dict_function:");
      if (this.dict_function == null) {
        sb.append("null");
      } else {
        sb.append(this.dict_function);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    if (name == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
    }
    if (binary_type == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'binary_type' was not present! Struct: " + toString());
    }
    if (arg_types == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'arg_types' was not present! Struct: " + toString());
    }
    if (ret_type == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'ret_type' was not present! Struct: " + toString());
    }
    // alas, we cannot check 'has_var_args' because it's a primitive and you chose the non-beans generator.
    // check for sub-struct validity
    if (name != null) {
      name.validate();
    }
    if (ret_type != null) {
      ret_type.validate();
    }
    if (scalar_fn != null) {
      scalar_fn.validate();
    }
    if (aggregate_fn != null) {
      aggregate_fn.validate();
    }
    if (dict_function != null) {
      dict_function.validate();
    }
  }

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

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

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

  private static class TFunctionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TFunction> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TFunction 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: // NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.name = new TFunctionName();
              struct.name.read(iprot);
              struct.setNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // BINARY_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.binary_type = org.apache.doris.thrift.TFunctionBinaryType.findByValue(iprot.readI32());
              struct.setBinaryTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // ARG_TYPES
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
                struct.arg_types = new java.util.ArrayList<TTypeDesc>(_list32.size);
                @org.apache.thrift.annotation.Nullable TTypeDesc _elem33;
                for (int _i34 = 0; _i34 < _list32.size; ++_i34)
                {
                  _elem33 = new TTypeDesc();
                  _elem33.read(iprot);
                  struct.arg_types.add(_elem33);
                }
                iprot.readListEnd();
              }
              struct.setArgTypesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // RET_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.ret_type = new TTypeDesc();
              struct.ret_type.read(iprot);
              struct.setRetTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // HAS_VAR_ARGS
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.has_var_args = iprot.readBool();
              struct.setHasVarArgsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // COMMENT
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.comment = iprot.readString();
              struct.setCommentIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // SIGNATURE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.signature = iprot.readString();
              struct.setSignatureIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // HDFS_LOCATION
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.hdfs_location = iprot.readString();
              struct.setHdfsLocationIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // SCALAR_FN
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.scalar_fn = new TScalarFunction();
              struct.scalar_fn.read(iprot);
              struct.setScalarFnIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // AGGREGATE_FN
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.aggregate_fn = new TAggregateFunction();
              struct.aggregate_fn.read(iprot);
              struct.setAggregateFnIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.id = iprot.readI64();
              struct.setIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 12: // CHECKSUM
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.checksum = iprot.readString();
              struct.setChecksumIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 13: // VECTORIZED
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.vectorized = iprot.readBool();
              struct.setVectorizedIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 14: // IS_UDTF_FUNCTION
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.is_udtf_function = iprot.readBool();
              struct.setIsUdtfFunctionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 15: // IS_STATIC_LOAD
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.is_static_load = iprot.readBool();
              struct.setIsStaticLoadIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 16: // EXPIRATION_TIME
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.expiration_time = iprot.readI64();
              struct.setExpirationTimeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 17: // DICT_FUNCTION
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.dict_function = new TDictFunction();
              struct.dict_function.read(iprot);
              struct.setDictFunctionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      if (!struct.isSetHasVarArgs()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'has_var_args' was not found in serialized data! Struct: " + toString());
      }
      struct.validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.name != null) {
        oprot.writeFieldBegin(NAME_FIELD_DESC);
        struct.name.write(oprot);
        oprot.writeFieldEnd();
      }
      if (struct.binary_type != null) {
        oprot.writeFieldBegin(BINARY_TYPE_FIELD_DESC);
        oprot.writeI32(struct.binary_type.getValue());
        oprot.writeFieldEnd();
      }
      if (struct.arg_types != null) {
        oprot.writeFieldBegin(ARG_TYPES_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.arg_types.size()));
          for (TTypeDesc _iter35 : struct.arg_types)
          {
            _iter35.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.ret_type != null) {
        oprot.writeFieldBegin(RET_TYPE_FIELD_DESC);
        struct.ret_type.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(HAS_VAR_ARGS_FIELD_DESC);
      oprot.writeBool(struct.has_var_args);
      oprot.writeFieldEnd();
      if (struct.comment != null) {
        if (struct.isSetComment()) {
          oprot.writeFieldBegin(COMMENT_FIELD_DESC);
          oprot.writeString(struct.comment);
          oprot.writeFieldEnd();
        }
      }
      if (struct.signature != null) {
        if (struct.isSetSignature()) {
          oprot.writeFieldBegin(SIGNATURE_FIELD_DESC);
          oprot.writeString(struct.signature);
          oprot.writeFieldEnd();
        }
      }
      if (struct.hdfs_location != null) {
        if (struct.isSetHdfsLocation()) {
          oprot.writeFieldBegin(HDFS_LOCATION_FIELD_DESC);
          oprot.writeString(struct.hdfs_location);
          oprot.writeFieldEnd();
        }
      }
      if (struct.scalar_fn != null) {
        if (struct.isSetScalarFn()) {
          oprot.writeFieldBegin(SCALAR_FN_FIELD_DESC);
          struct.scalar_fn.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.aggregate_fn != null) {
        if (struct.isSetAggregateFn()) {
          oprot.writeFieldBegin(AGGREGATE_FN_FIELD_DESC);
          struct.aggregate_fn.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetId()) {
        oprot.writeFieldBegin(ID_FIELD_DESC);
        oprot.writeI64(struct.id);
        oprot.writeFieldEnd();
      }
      if (struct.checksum != null) {
        if (struct.isSetChecksum()) {
          oprot.writeFieldBegin(CHECKSUM_FIELD_DESC);
          oprot.writeString(struct.checksum);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetVectorized()) {
        oprot.writeFieldBegin(VECTORIZED_FIELD_DESC);
        oprot.writeBool(struct.vectorized);
        oprot.writeFieldEnd();
      }
      if (struct.isSetIsUdtfFunction()) {
        oprot.writeFieldBegin(IS_UDTF_FUNCTION_FIELD_DESC);
        oprot.writeBool(struct.is_udtf_function);
        oprot.writeFieldEnd();
      }
      if (struct.isSetIsStaticLoad()) {
        oprot.writeFieldBegin(IS_STATIC_LOAD_FIELD_DESC);
        oprot.writeBool(struct.is_static_load);
        oprot.writeFieldEnd();
      }
      if (struct.isSetExpirationTime()) {
        oprot.writeFieldBegin(EXPIRATION_TIME_FIELD_DESC);
        oprot.writeI64(struct.expiration_time);
        oprot.writeFieldEnd();
      }
      if (struct.dict_function != null) {
        if (struct.isSetDictFunction()) {
          oprot.writeFieldBegin(DICT_FUNCTION_FIELD_DESC);
          struct.dict_function.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TFunctionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TFunction> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TFunction struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.name.write(oprot);
      oprot.writeI32(struct.binary_type.getValue());
      {
        oprot.writeI32(struct.arg_types.size());
        for (TTypeDesc _iter36 : struct.arg_types)
        {
          _iter36.write(oprot);
        }
      }
      struct.ret_type.write(oprot);
      oprot.writeBool(struct.has_var_args);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetComment()) {
        optionals.set(0);
      }
      if (struct.isSetSignature()) {
        optionals.set(1);
      }
      if (struct.isSetHdfsLocation()) {
        optionals.set(2);
      }
      if (struct.isSetScalarFn()) {
        optionals.set(3);
      }
      if (struct.isSetAggregateFn()) {
        optionals.set(4);
      }
      if (struct.isSetId()) {
        optionals.set(5);
      }
      if (struct.isSetChecksum()) {
        optionals.set(6);
      }
      if (struct.isSetVectorized()) {
        optionals.set(7);
      }
      if (struct.isSetIsUdtfFunction()) {
        optionals.set(8);
      }
      if (struct.isSetIsStaticLoad()) {
        optionals.set(9);
      }
      if (struct.isSetExpirationTime()) {
        optionals.set(10);
      }
      if (struct.isSetDictFunction()) {
        optionals.set(11);
      }
      oprot.writeBitSet(optionals, 12);
      if (struct.isSetComment()) {
        oprot.writeString(struct.comment);
      }
      if (struct.isSetSignature()) {
        oprot.writeString(struct.signature);
      }
      if (struct.isSetHdfsLocation()) {
        oprot.writeString(struct.hdfs_location);
      }
      if (struct.isSetScalarFn()) {
        struct.scalar_fn.write(oprot);
      }
      if (struct.isSetAggregateFn()) {
        struct.aggregate_fn.write(oprot);
      }
      if (struct.isSetId()) {
        oprot.writeI64(struct.id);
      }
      if (struct.isSetChecksum()) {
        oprot.writeString(struct.checksum);
      }
      if (struct.isSetVectorized()) {
        oprot.writeBool(struct.vectorized);
      }
      if (struct.isSetIsUdtfFunction()) {
        oprot.writeBool(struct.is_udtf_function);
      }
      if (struct.isSetIsStaticLoad()) {
        oprot.writeBool(struct.is_static_load);
      }
      if (struct.isSetExpirationTime()) {
        oprot.writeI64(struct.expiration_time);
      }
      if (struct.isSetDictFunction()) {
        struct.dict_function.write(oprot);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TFunction struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.name = new TFunctionName();
      struct.name.read(iprot);
      struct.setNameIsSet(true);
      struct.binary_type = org.apache.doris.thrift.TFunctionBinaryType.findByValue(iprot.readI32());
      struct.setBinaryTypeIsSet(true);
      {
        org.apache.thrift.protocol.TList _list37 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
        struct.arg_types = new java.util.ArrayList<TTypeDesc>(_list37.size);
        @org.apache.thrift.annotation.Nullable TTypeDesc _elem38;
        for (int _i39 = 0; _i39 < _list37.size; ++_i39)
        {
          _elem38 = new TTypeDesc();
          _elem38.read(iprot);
          struct.arg_types.add(_elem38);
        }
      }
      struct.setArgTypesIsSet(true);
      struct.ret_type = new TTypeDesc();
      struct.ret_type.read(iprot);
      struct.setRetTypeIsSet(true);
      struct.has_var_args = iprot.readBool();
      struct.setHasVarArgsIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(12);
      if (incoming.get(0)) {
        struct.comment = iprot.readString();
        struct.setCommentIsSet(true);
      }
      if (incoming.get(1)) {
        struct.signature = iprot.readString();
        struct.setSignatureIsSet(true);
      }
      if (incoming.get(2)) {
        struct.hdfs_location = iprot.readString();
        struct.setHdfsLocationIsSet(true);
      }
      if (incoming.get(3)) {
        struct.scalar_fn = new TScalarFunction();
        struct.scalar_fn.read(iprot);
        struct.setScalarFnIsSet(true);
      }
      if (incoming.get(4)) {
        struct.aggregate_fn = new TAggregateFunction();
        struct.aggregate_fn.read(iprot);
        struct.setAggregateFnIsSet(true);
      }
      if (incoming.get(5)) {
        struct.id = iprot.readI64();
        struct.setIdIsSet(true);
      }
      if (incoming.get(6)) {
        struct.checksum = iprot.readString();
        struct.setChecksumIsSet(true);
      }
      if (incoming.get(7)) {
        struct.vectorized = iprot.readBool();
        struct.setVectorizedIsSet(true);
      }
      if (incoming.get(8)) {
        struct.is_udtf_function = iprot.readBool();
        struct.setIsUdtfFunctionIsSet(true);
      }
      if (incoming.get(9)) {
        struct.is_static_load = iprot.readBool();
        struct.setIsStaticLoadIsSet(true);
      }
      if (incoming.get(10)) {
        struct.expiration_time = iprot.readI64();
        struct.setExpirationTimeIsSet(true);
      }
      if (incoming.get(11)) {
        struct.dict_function = new TDictFunction();
        struct.dict_function.read(iprot);
        struct.setDictFunctionIsSet(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();
  }
}