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

  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1);
  private static final org.apache.thrift.protocol.TField CATALOG_FIELD_DESC = new org.apache.thrift.protocol.TField("catalog", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField TBL_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField REPLICA_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("replica_id", org.apache.thrift.protocol.TType.I64, (short)5);
  private static final org.apache.thrift.protocol.TField REPLICA_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("replica_ids", org.apache.thrift.protocol.TType.LIST, (short)6);

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

  /**
   * 
   * @see TQueryStatsType
   */
  public @org.apache.thrift.annotation.Nullable TQueryStatsType type; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String catalog; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String db; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String tbl; // optional
  public long replica_id; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> replica_ids; // 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 {
    /**
     * 
     * @see TQueryStatsType
     */
    TYPE((short)1, "type"),
    CATALOG((short)2, "catalog"),
    DB((short)3, "db"),
    TBL((short)4, "tbl"),
    REPLICA_ID((short)5, "replica_id"),
    REPLICA_IDS((short)6, "replica_ids");

    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: // TYPE
          return TYPE;
        case 2: // CATALOG
          return CATALOG;
        case 3: // DB
          return DB;
        case 4: // TBL
          return TBL;
        case 5: // REPLICA_ID
          return REPLICA_ID;
        case 6: // REPLICA_IDS
          return REPLICA_IDS;
        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 __REPLICA_ID_ISSET_ID = 0;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.TYPE,_Fields.CATALOG,_Fields.DB,_Fields.TBL,_Fields.REPLICA_ID,_Fields.REPLICA_IDS};
  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.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TQueryStatsType.class)));
    tmpMap.put(_Fields.CATALOG, new org.apache.thrift.meta_data.FieldMetaData("catalog", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.DB, new org.apache.thrift.meta_data.FieldMetaData("db", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TBL, new org.apache.thrift.meta_data.FieldMetaData("tbl", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.REPLICA_ID, new org.apache.thrift.meta_data.FieldMetaData("replica_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.REPLICA_IDS, new org.apache.thrift.meta_data.FieldMetaData("replica_ids", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetQueryStatsRequest.class, metaDataMap);
  }

  public TGetQueryStatsRequest() {
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TGetQueryStatsRequest(TGetQueryStatsRequest other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetType()) {
      this.type = other.type;
    }
    if (other.isSetCatalog()) {
      this.catalog = other.catalog;
    }
    if (other.isSetDb()) {
      this.db = other.db;
    }
    if (other.isSetTbl()) {
      this.tbl = other.tbl;
    }
    this.replica_id = other.replica_id;
    if (other.isSetReplicaIds()) {
      java.util.List<java.lang.Long> __this__replica_ids = new java.util.ArrayList<java.lang.Long>(other.replica_ids);
      this.replica_ids = __this__replica_ids;
    }
  }

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

  @Override
  public void clear() {
    this.type = null;
    this.catalog = null;
    this.db = null;
    this.tbl = null;
    setReplicaIdIsSet(false);
    this.replica_id = 0;
    this.replica_ids = null;
  }

  /**
   * 
   * @see TQueryStatsType
   */
  @org.apache.thrift.annotation.Nullable
  public TQueryStatsType getType() {
    return this.type;
  }

  /**
   * 
   * @see TQueryStatsType
   */
  public TGetQueryStatsRequest setType(@org.apache.thrift.annotation.Nullable TQueryStatsType type) {
    this.type = type;
    return this;
  }

  public void unsetType() {
    this.type = null;
  }

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

  public void setTypeIsSet(boolean value) {
    if (!value) {
      this.type = null;
    }
  }

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

  public TGetQueryStatsRequest setCatalog(@org.apache.thrift.annotation.Nullable java.lang.String catalog) {
    this.catalog = catalog;
    return this;
  }

  public void unsetCatalog() {
    this.catalog = null;
  }

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

  public void setCatalogIsSet(boolean value) {
    if (!value) {
      this.catalog = null;
    }
  }

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

  public TGetQueryStatsRequest setDb(@org.apache.thrift.annotation.Nullable java.lang.String db) {
    this.db = db;
    return this;
  }

  public void unsetDb() {
    this.db = null;
  }

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

  public void setDbIsSet(boolean value) {
    if (!value) {
      this.db = null;
    }
  }

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

  public TGetQueryStatsRequest setTbl(@org.apache.thrift.annotation.Nullable java.lang.String tbl) {
    this.tbl = tbl;
    return this;
  }

  public void unsetTbl() {
    this.tbl = null;
  }

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

  public void setTblIsSet(boolean value) {
    if (!value) {
      this.tbl = null;
    }
  }

  public long getReplicaId() {
    return this.replica_id;
  }

  public TGetQueryStatsRequest setReplicaId(long replica_id) {
    this.replica_id = replica_id;
    setReplicaIdIsSet(true);
    return this;
  }

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

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

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

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

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

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

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

  public TGetQueryStatsRequest setReplicaIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> replica_ids) {
    this.replica_ids = replica_ids;
    return this;
  }

  public void unsetReplicaIds() {
    this.replica_ids = null;
  }

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

  public void setReplicaIdsIsSet(boolean value) {
    if (!value) {
      this.replica_ids = null;
    }
  }

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case TYPE:
      if (value == null) {
        unsetType();
      } else {
        setType((TQueryStatsType)value);
      }
      break;

    case CATALOG:
      if (value == null) {
        unsetCatalog();
      } else {
        setCatalog((java.lang.String)value);
      }
      break;

    case DB:
      if (value == null) {
        unsetDb();
      } else {
        setDb((java.lang.String)value);
      }
      break;

    case TBL:
      if (value == null) {
        unsetTbl();
      } else {
        setTbl((java.lang.String)value);
      }
      break;

    case REPLICA_ID:
      if (value == null) {
        unsetReplicaId();
      } else {
        setReplicaId((java.lang.Long)value);
      }
      break;

    case REPLICA_IDS:
      if (value == null) {
        unsetReplicaIds();
      } else {
        setReplicaIds((java.util.List<java.lang.Long>)value);
      }
      break;

    }
  }

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

    case CATALOG:
      return getCatalog();

    case DB:
      return getDb();

    case TBL:
      return getTbl();

    case REPLICA_ID:
      return getReplicaId();

    case REPLICA_IDS:
      return getReplicaIds();

    }
    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 TYPE:
      return isSetType();
    case CATALOG:
      return isSetCatalog();
    case DB:
      return isSetDb();
    case TBL:
      return isSetTbl();
    case REPLICA_ID:
      return isSetReplicaId();
    case REPLICA_IDS:
      return isSetReplicaIds();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_type = true && this.isSetType();
    boolean that_present_type = true && that.isSetType();
    if (this_present_type || that_present_type) {
      if (!(this_present_type && that_present_type))
        return false;
      if (!this.type.equals(that.type))
        return false;
    }

    boolean this_present_catalog = true && this.isSetCatalog();
    boolean that_present_catalog = true && that.isSetCatalog();
    if (this_present_catalog || that_present_catalog) {
      if (!(this_present_catalog && that_present_catalog))
        return false;
      if (!this.catalog.equals(that.catalog))
        return false;
    }

    boolean this_present_db = true && this.isSetDb();
    boolean that_present_db = true && that.isSetDb();
    if (this_present_db || that_present_db) {
      if (!(this_present_db && that_present_db))
        return false;
      if (!this.db.equals(that.db))
        return false;
    }

    boolean this_present_tbl = true && this.isSetTbl();
    boolean that_present_tbl = true && that.isSetTbl();
    if (this_present_tbl || that_present_tbl) {
      if (!(this_present_tbl && that_present_tbl))
        return false;
      if (!this.tbl.equals(that.tbl))
        return false;
    }

    boolean this_present_replica_id = true && this.isSetReplicaId();
    boolean that_present_replica_id = true && that.isSetReplicaId();
    if (this_present_replica_id || that_present_replica_id) {
      if (!(this_present_replica_id && that_present_replica_id))
        return false;
      if (this.replica_id != that.replica_id)
        return false;
    }

    boolean this_present_replica_ids = true && this.isSetReplicaIds();
    boolean that_present_replica_ids = true && that.isSetReplicaIds();
    if (this_present_replica_ids || that_present_replica_ids) {
      if (!(this_present_replica_ids && that_present_replica_ids))
        return false;
      if (!this.replica_ids.equals(that.replica_ids))
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287);
    if (isSetType())
      hashCode = hashCode * 8191 + type.getValue();

    hashCode = hashCode * 8191 + ((isSetCatalog()) ? 131071 : 524287);
    if (isSetCatalog())
      hashCode = hashCode * 8191 + catalog.hashCode();

    hashCode = hashCode * 8191 + ((isSetDb()) ? 131071 : 524287);
    if (isSetDb())
      hashCode = hashCode * 8191 + db.hashCode();

    hashCode = hashCode * 8191 + ((isSetTbl()) ? 131071 : 524287);
    if (isSetTbl())
      hashCode = hashCode * 8191 + tbl.hashCode();

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

    hashCode = hashCode * 8191 + ((isSetReplicaIds()) ? 131071 : 524287);
    if (isSetReplicaIds())
      hashCode = hashCode * 8191 + replica_ids.hashCode();

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetCatalog(), other.isSetCatalog());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCatalog()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalog, other.catalog);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetDb(), other.isSetDb());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDb()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, other.db);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTbl(), other.isSetTbl());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTbl()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl, other.tbl);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetReplicaId(), other.isSetReplicaId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetReplicaId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replica_id, other.replica_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetReplicaIds(), other.isSetReplicaIds());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetReplicaIds()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replica_ids, other.replica_ids);
      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("TGetQueryStatsRequest(");
    boolean first = true;

    if (isSetType()) {
      sb.append("type:");
      if (this.type == null) {
        sb.append("null");
      } else {
        sb.append(this.type);
      }
      first = false;
    }
    if (isSetCatalog()) {
      if (!first) sb.append(", ");
      sb.append("catalog:");
      if (this.catalog == null) {
        sb.append("null");
      } else {
        sb.append(this.catalog);
      }
      first = false;
    }
    if (isSetDb()) {
      if (!first) sb.append(", ");
      sb.append("db:");
      if (this.db == null) {
        sb.append("null");
      } else {
        sb.append(this.db);
      }
      first = false;
    }
    if (isSetTbl()) {
      if (!first) sb.append(", ");
      sb.append("tbl:");
      if (this.tbl == null) {
        sb.append("null");
      } else {
        sb.append(this.tbl);
      }
      first = false;
    }
    if (isSetReplicaId()) {
      if (!first) sb.append(", ");
      sb.append("replica_id:");
      sb.append(this.replica_id);
      first = false;
    }
    if (isSetReplicaIds()) {
      if (!first) sb.append(", ");
      sb.append("replica_ids:");
      if (this.replica_ids == null) {
        sb.append("null");
      } else {
        sb.append(this.replica_ids);
      }
      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 TGetQueryStatsRequestStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TGetQueryStatsRequestStandardScheme getScheme() {
      return new TGetQueryStatsRequestStandardScheme();
    }
  }

  private static class TGetQueryStatsRequestStandardScheme extends org.apache.thrift.scheme.StandardScheme<TGetQueryStatsRequest> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TGetQueryStatsRequest 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: // TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.type = org.apache.doris.thrift.TQueryStatsType.findByValue(iprot.readI32());
              struct.setTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // CATALOG
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.catalog = iprot.readString();
              struct.setCatalogIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // DB
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.db = iprot.readString();
              struct.setDbIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // TBL
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.tbl = iprot.readString();
              struct.setTblIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // REPLICA_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.replica_id = iprot.readI64();
              struct.setReplicaIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // REPLICA_IDS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list514 = iprot.readListBegin();
                struct.replica_ids = new java.util.ArrayList<java.lang.Long>(_list514.size);
                long _elem515;
                for (int _i516 = 0; _i516 < _list514.size; ++_i516)
                {
                  _elem515 = iprot.readI64();
                  struct.replica_ids.add(_elem515);
                }
                iprot.readListEnd();
              }
              struct.setReplicaIdsIsSet(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, TGetQueryStatsRequest struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.type != null) {
        if (struct.isSetType()) {
          oprot.writeFieldBegin(TYPE_FIELD_DESC);
          oprot.writeI32(struct.type.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.catalog != null) {
        if (struct.isSetCatalog()) {
          oprot.writeFieldBegin(CATALOG_FIELD_DESC);
          oprot.writeString(struct.catalog);
          oprot.writeFieldEnd();
        }
      }
      if (struct.db != null) {
        if (struct.isSetDb()) {
          oprot.writeFieldBegin(DB_FIELD_DESC);
          oprot.writeString(struct.db);
          oprot.writeFieldEnd();
        }
      }
      if (struct.tbl != null) {
        if (struct.isSetTbl()) {
          oprot.writeFieldBegin(TBL_FIELD_DESC);
          oprot.writeString(struct.tbl);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetReplicaId()) {
        oprot.writeFieldBegin(REPLICA_ID_FIELD_DESC);
        oprot.writeI64(struct.replica_id);
        oprot.writeFieldEnd();
      }
      if (struct.replica_ids != null) {
        if (struct.isSetReplicaIds()) {
          oprot.writeFieldBegin(REPLICA_IDS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.replica_ids.size()));
            for (long _iter517 : struct.replica_ids)
            {
              oprot.writeI64(_iter517);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TGetQueryStatsRequestTupleScheme extends org.apache.thrift.scheme.TupleScheme<TGetQueryStatsRequest> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TGetQueryStatsRequest 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.isSetType()) {
        optionals.set(0);
      }
      if (struct.isSetCatalog()) {
        optionals.set(1);
      }
      if (struct.isSetDb()) {
        optionals.set(2);
      }
      if (struct.isSetTbl()) {
        optionals.set(3);
      }
      if (struct.isSetReplicaId()) {
        optionals.set(4);
      }
      if (struct.isSetReplicaIds()) {
        optionals.set(5);
      }
      oprot.writeBitSet(optionals, 6);
      if (struct.isSetType()) {
        oprot.writeI32(struct.type.getValue());
      }
      if (struct.isSetCatalog()) {
        oprot.writeString(struct.catalog);
      }
      if (struct.isSetDb()) {
        oprot.writeString(struct.db);
      }
      if (struct.isSetTbl()) {
        oprot.writeString(struct.tbl);
      }
      if (struct.isSetReplicaId()) {
        oprot.writeI64(struct.replica_id);
      }
      if (struct.isSetReplicaIds()) {
        {
          oprot.writeI32(struct.replica_ids.size());
          for (long _iter518 : struct.replica_ids)
          {
            oprot.writeI64(_iter518);
          }
        }
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TGetQueryStatsRequest struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet incoming = iprot.readBitSet(6);
      if (incoming.get(0)) {
        struct.type = org.apache.doris.thrift.TQueryStatsType.findByValue(iprot.readI32());
        struct.setTypeIsSet(true);
      }
      if (incoming.get(1)) {
        struct.catalog = iprot.readString();
        struct.setCatalogIsSet(true);
      }
      if (incoming.get(2)) {
        struct.db = iprot.readString();
        struct.setDbIsSet(true);
      }
      if (incoming.get(3)) {
        struct.tbl = iprot.readString();
        struct.setTblIsSet(true);
      }
      if (incoming.get(4)) {
        struct.replica_id = iprot.readI64();
        struct.setReplicaIdIsSet(true);
      }
      if (incoming.get(5)) {
        {
          org.apache.thrift.protocol.TList _list519 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
          struct.replica_ids = new java.util.ArrayList<java.lang.Long>(_list519.size);
          long _elem520;
          for (int _i521 = 0; _i521 < _list519.size; ++_i521)
          {
            _elem520 = iprot.readI64();
            struct.replica_ids.add(_elem520);
          }
        }
        struct.setReplicaIdsIsSet(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();
  }
}