All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.starrocks.thrift.TScanOpenParams Maven / Gradle / Ivy

The newest version!
/**
 * Autogenerated by Thrift Compiler (0.13.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package com.starrocks.thrift;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.13.0)", date = "2022-03-09")
public class TScanOpenParams implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TScanOpenParams");

  private static final org.apache.thrift.protocol.TField CLUSTER_FIELD_DESC = new org.apache.thrift.protocol.TField("cluster", org.apache.thrift.protocol.TType.STRING, (short)1);
  private static final org.apache.thrift.protocol.TField DATABASE_FIELD_DESC = new org.apache.thrift.protocol.TField("database", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField TABLET_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("tablet_ids", org.apache.thrift.protocol.TType.LIST, (short)4);
  private static final org.apache.thrift.protocol.TField OPAQUED_QUERY_PLAN_FIELD_DESC = new org.apache.thrift.protocol.TField("opaqued_query_plan", org.apache.thrift.protocol.TType.STRING, (short)5);
  private static final org.apache.thrift.protocol.TField BATCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("batch_size", org.apache.thrift.protocol.TType.I32, (short)6);
  private static final org.apache.thrift.protocol.TField PROPERTIES_FIELD_DESC = new org.apache.thrift.protocol.TField("properties", org.apache.thrift.protocol.TType.MAP, (short)7);
  private static final org.apache.thrift.protocol.TField LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("limit", org.apache.thrift.protocol.TType.I64, (short)8);
  private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)9);
  private static final org.apache.thrift.protocol.TField PASSWD_FIELD_DESC = new org.apache.thrift.protocol.TField("passwd", org.apache.thrift.protocol.TType.STRING, (short)10);
  private static final org.apache.thrift.protocol.TField KEEP_ALIVE_MIN_FIELD_DESC = new org.apache.thrift.protocol.TField("keep_alive_min", org.apache.thrift.protocol.TType.I16, (short)11);
  private static final org.apache.thrift.protocol.TField QUERY_TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("query_timeout", org.apache.thrift.protocol.TType.I32, (short)12);
  private static final org.apache.thrift.protocol.TField MEM_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("mem_limit", org.apache.thrift.protocol.TType.I64, (short)13);

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

  public @org.apache.thrift.annotation.Nullable java.lang.String cluster; // required
  public @org.apache.thrift.annotation.Nullable java.lang.String database; // required
  public @org.apache.thrift.annotation.Nullable java.lang.String table; // required
  public @org.apache.thrift.annotation.Nullable java.util.List tablet_ids; // required
  public @org.apache.thrift.annotation.Nullable java.lang.String opaqued_query_plan; // required
  public int batch_size; // optional
  public @org.apache.thrift.annotation.Nullable java.util.Map properties; // optional
  public long limit; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String user; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String passwd; // optional
  public short keep_alive_min; // optional
  public int query_timeout; // optional
  public long mem_limit; // optional

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    CLUSTER((short)1, "cluster"),
    DATABASE((short)2, "database"),
    TABLE((short)3, "table"),
    TABLET_IDS((short)4, "tablet_ids"),
    OPAQUED_QUERY_PLAN((short)5, "opaqued_query_plan"),
    BATCH_SIZE((short)6, "batch_size"),
    PROPERTIES((short)7, "properties"),
    LIMIT((short)8, "limit"),
    USER((short)9, "user"),
    PASSWD((short)10, "passwd"),
    KEEP_ALIVE_MIN((short)11, "keep_alive_min"),
    QUERY_TIMEOUT((short)12, "query_timeout"),
    MEM_LIMIT((short)13, "mem_limit");

    private static final java.util.Map byName = new java.util.HashMap();

    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: // CLUSTER
          return CLUSTER;
        case 2: // DATABASE
          return DATABASE;
        case 3: // TABLE
          return TABLE;
        case 4: // TABLET_IDS
          return TABLET_IDS;
        case 5: // OPAQUED_QUERY_PLAN
          return OPAQUED_QUERY_PLAN;
        case 6: // BATCH_SIZE
          return BATCH_SIZE;
        case 7: // PROPERTIES
          return PROPERTIES;
        case 8: // LIMIT
          return LIMIT;
        case 9: // USER
          return USER;
        case 10: // PASSWD
          return PASSWD;
        case 11: // KEEP_ALIVE_MIN
          return KEEP_ALIVE_MIN;
        case 12: // QUERY_TIMEOUT
          return QUERY_TIMEOUT;
        case 13: // MEM_LIMIT
          return MEM_LIMIT;
        default:
          return null;
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, throwing an exception
     * if it is not found.
     */
    public static _Fields findByThriftIdOrThrow(int fieldId) {
      _Fields fields = findByThriftId(fieldId);
      if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    @org.apache.thrift.annotation.Nullable
    public static _Fields findByName(java.lang.String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final java.lang.String _fieldName;

    _Fields(short thriftId, java.lang.String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    public short getThriftFieldId() {
      return _thriftId;
    }

    public java.lang.String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final int __BATCH_SIZE_ISSET_ID = 0;
  private static final int __LIMIT_ISSET_ID = 1;
  private static final int __KEEP_ALIVE_MIN_ISSET_ID = 2;
  private static final int __QUERY_TIMEOUT_ISSET_ID = 3;
  private static final int __MEM_LIMIT_ISSET_ID = 4;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.BATCH_SIZE,_Fields.PROPERTIES,_Fields.LIMIT,_Fields.USER,_Fields.PASSWD,_Fields.KEEP_ALIVE_MIN,_Fields.QUERY_TIMEOUT,_Fields.MEM_LIMIT};
  public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.CLUSTER, new org.apache.thrift.meta_data.FieldMetaData("cluster", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.DATABASE, new org.apache.thrift.meta_data.FieldMetaData("database", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TABLET_IDS, new org.apache.thrift.meta_data.FieldMetaData("tablet_ids", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
    tmpMap.put(_Fields.OPAQUED_QUERY_PLAN, new org.apache.thrift.meta_data.FieldMetaData("opaqued_query_plan", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.BATCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("batch_size", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.PROPERTIES, new org.apache.thrift.meta_data.FieldMetaData("properties", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.LIMIT, new org.apache.thrift.meta_data.FieldMetaData("limit", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.PASSWD, new org.apache.thrift.meta_data.FieldMetaData("passwd", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.KEEP_ALIVE_MIN, new org.apache.thrift.meta_data.FieldMetaData("keep_alive_min", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16)));
    tmpMap.put(_Fields.QUERY_TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("query_timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.MEM_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("mem_limit", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TScanOpenParams.class, metaDataMap);
  }

  public TScanOpenParams() {
  }

  public TScanOpenParams(
    java.lang.String cluster,
    java.lang.String database,
    java.lang.String table,
    java.util.List tablet_ids,
    java.lang.String opaqued_query_plan)
  {
    this();
    this.cluster = cluster;
    this.database = database;
    this.table = table;
    this.tablet_ids = tablet_ids;
    this.opaqued_query_plan = opaqued_query_plan;
  }

  /**
   * Performs a deep copy on other.
   */
  public TScanOpenParams(TScanOpenParams other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetCluster()) {
      this.cluster = other.cluster;
    }
    if (other.isSetDatabase()) {
      this.database = other.database;
    }
    if (other.isSetTable()) {
      this.table = other.table;
    }
    if (other.isSetTablet_ids()) {
      java.util.List __this__tablet_ids = new java.util.ArrayList(other.tablet_ids);
      this.tablet_ids = __this__tablet_ids;
    }
    if (other.isSetOpaqued_query_plan()) {
      this.opaqued_query_plan = other.opaqued_query_plan;
    }
    this.batch_size = other.batch_size;
    if (other.isSetProperties()) {
      java.util.Map __this__properties = new java.util.HashMap(other.properties);
      this.properties = __this__properties;
    }
    this.limit = other.limit;
    if (other.isSetUser()) {
      this.user = other.user;
    }
    if (other.isSetPasswd()) {
      this.passwd = other.passwd;
    }
    this.keep_alive_min = other.keep_alive_min;
    this.query_timeout = other.query_timeout;
    this.mem_limit = other.mem_limit;
  }

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

  @Override
  public void clear() {
    this.cluster = null;
    this.database = null;
    this.table = null;
    this.tablet_ids = null;
    this.opaqued_query_plan = null;
    setBatch_sizeIsSet(false);
    this.batch_size = 0;
    this.properties = null;
    setLimitIsSet(false);
    this.limit = 0;
    this.user = null;
    this.passwd = null;
    setKeep_alive_minIsSet(false);
    this.keep_alive_min = 0;
    setQuery_timeoutIsSet(false);
    this.query_timeout = 0;
    setMem_limitIsSet(false);
    this.mem_limit = 0;
  }

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

  public TScanOpenParams setCluster(@org.apache.thrift.annotation.Nullable java.lang.String cluster) {
    this.cluster = cluster;
    return this;
  }

  public void unsetCluster() {
    this.cluster = null;
  }

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

  public void setClusterIsSet(boolean value) {
    if (!value) {
      this.cluster = null;
    }
  }

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

  public TScanOpenParams setDatabase(@org.apache.thrift.annotation.Nullable java.lang.String database) {
    this.database = database;
    return this;
  }

  public void unsetDatabase() {
    this.database = null;
  }

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

  public void setDatabaseIsSet(boolean value) {
    if (!value) {
      this.database = null;
    }
  }

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

  public TScanOpenParams setTable(@org.apache.thrift.annotation.Nullable java.lang.String table) {
    this.table = table;
    return this;
  }

  public void unsetTable() {
    this.table = null;
  }

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

  public void setTableIsSet(boolean value) {
    if (!value) {
      this.table = null;
    }
  }

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

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator getTablet_idsIterator() {
    return (this.tablet_ids == null) ? null : this.tablet_ids.iterator();
  }

  public void addToTablet_ids(long elem) {
    if (this.tablet_ids == null) {
      this.tablet_ids = new java.util.ArrayList();
    }
    this.tablet_ids.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List getTablet_ids() {
    return this.tablet_ids;
  }

  public TScanOpenParams setTablet_ids(@org.apache.thrift.annotation.Nullable java.util.List tablet_ids) {
    this.tablet_ids = tablet_ids;
    return this;
  }

  public void unsetTablet_ids() {
    this.tablet_ids = null;
  }

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

  public void setTablet_idsIsSet(boolean value) {
    if (!value) {
      this.tablet_ids = null;
    }
  }

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

  public TScanOpenParams setOpaqued_query_plan(@org.apache.thrift.annotation.Nullable java.lang.String opaqued_query_plan) {
    this.opaqued_query_plan = opaqued_query_plan;
    return this;
  }

  public void unsetOpaqued_query_plan() {
    this.opaqued_query_plan = null;
  }

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

  public void setOpaqued_query_planIsSet(boolean value) {
    if (!value) {
      this.opaqued_query_plan = null;
    }
  }

  public int getBatch_size() {
    return this.batch_size;
  }

  public TScanOpenParams setBatch_size(int batch_size) {
    this.batch_size = batch_size;
    setBatch_sizeIsSet(true);
    return this;
  }

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

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

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

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

  public void putToProperties(java.lang.String key, java.lang.String val) {
    if (this.properties == null) {
      this.properties = new java.util.HashMap();
    }
    this.properties.put(key, val);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Map getProperties() {
    return this.properties;
  }

  public TScanOpenParams setProperties(@org.apache.thrift.annotation.Nullable java.util.Map properties) {
    this.properties = properties;
    return this;
  }

  public void unsetProperties() {
    this.properties = null;
  }

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

  public void setPropertiesIsSet(boolean value) {
    if (!value) {
      this.properties = null;
    }
  }

  public long getLimit() {
    return this.limit;
  }

  public TScanOpenParams setLimit(long limit) {
    this.limit = limit;
    setLimitIsSet(true);
    return this;
  }

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

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

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

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

  public TScanOpenParams setUser(@org.apache.thrift.annotation.Nullable java.lang.String user) {
    this.user = user;
    return this;
  }

  public void unsetUser() {
    this.user = null;
  }

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

  public void setUserIsSet(boolean value) {
    if (!value) {
      this.user = null;
    }
  }

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

  public TScanOpenParams setPasswd(@org.apache.thrift.annotation.Nullable java.lang.String passwd) {
    this.passwd = passwd;
    return this;
  }

  public void unsetPasswd() {
    this.passwd = null;
  }

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

  public void setPasswdIsSet(boolean value) {
    if (!value) {
      this.passwd = null;
    }
  }

  public short getKeep_alive_min() {
    return this.keep_alive_min;
  }

  public TScanOpenParams setKeep_alive_min(short keep_alive_min) {
    this.keep_alive_min = keep_alive_min;
    setKeep_alive_minIsSet(true);
    return this;
  }

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

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

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

  public int getQuery_timeout() {
    return this.query_timeout;
  }

  public TScanOpenParams setQuery_timeout(int query_timeout) {
    this.query_timeout = query_timeout;
    setQuery_timeoutIsSet(true);
    return this;
  }

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

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

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

  public long getMem_limit() {
    return this.mem_limit;
  }

  public TScanOpenParams setMem_limit(long mem_limit) {
    this.mem_limit = mem_limit;
    setMem_limitIsSet(true);
    return this;
  }

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

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

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

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

    case DATABASE:
      if (value == null) {
        unsetDatabase();
      } else {
        setDatabase((java.lang.String)value);
      }
      break;

    case TABLE:
      if (value == null) {
        unsetTable();
      } else {
        setTable((java.lang.String)value);
      }
      break;

    case TABLET_IDS:
      if (value == null) {
        unsetTablet_ids();
      } else {
        setTablet_ids((java.util.List)value);
      }
      break;

    case OPAQUED_QUERY_PLAN:
      if (value == null) {
        unsetOpaqued_query_plan();
      } else {
        setOpaqued_query_plan((java.lang.String)value);
      }
      break;

    case BATCH_SIZE:
      if (value == null) {
        unsetBatch_size();
      } else {
        setBatch_size((java.lang.Integer)value);
      }
      break;

    case PROPERTIES:
      if (value == null) {
        unsetProperties();
      } else {
        setProperties((java.util.Map)value);
      }
      break;

    case LIMIT:
      if (value == null) {
        unsetLimit();
      } else {
        setLimit((java.lang.Long)value);
      }
      break;

    case USER:
      if (value == null) {
        unsetUser();
      } else {
        setUser((java.lang.String)value);
      }
      break;

    case PASSWD:
      if (value == null) {
        unsetPasswd();
      } else {
        setPasswd((java.lang.String)value);
      }
      break;

    case KEEP_ALIVE_MIN:
      if (value == null) {
        unsetKeep_alive_min();
      } else {
        setKeep_alive_min((java.lang.Short)value);
      }
      break;

    case QUERY_TIMEOUT:
      if (value == null) {
        unsetQuery_timeout();
      } else {
        setQuery_timeout((java.lang.Integer)value);
      }
      break;

    case MEM_LIMIT:
      if (value == null) {
        unsetMem_limit();
      } else {
        setMem_limit((java.lang.Long)value);
      }
      break;

    }
  }

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

    case DATABASE:
      return getDatabase();

    case TABLE:
      return getTable();

    case TABLET_IDS:
      return getTablet_ids();

    case OPAQUED_QUERY_PLAN:
      return getOpaqued_query_plan();

    case BATCH_SIZE:
      return getBatch_size();

    case PROPERTIES:
      return getProperties();

    case LIMIT:
      return getLimit();

    case USER:
      return getUser();

    case PASSWD:
      return getPasswd();

    case KEEP_ALIVE_MIN:
      return getKeep_alive_min();

    case QUERY_TIMEOUT:
      return getQuery_timeout();

    case MEM_LIMIT:
      return getMem_limit();

    }
    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 CLUSTER:
      return isSetCluster();
    case DATABASE:
      return isSetDatabase();
    case TABLE:
      return isSetTable();
    case TABLET_IDS:
      return isSetTablet_ids();
    case OPAQUED_QUERY_PLAN:
      return isSetOpaqued_query_plan();
    case BATCH_SIZE:
      return isSetBatch_size();
    case PROPERTIES:
      return isSetProperties();
    case LIMIT:
      return isSetLimit();
    case USER:
      return isSetUser();
    case PASSWD:
      return isSetPasswd();
    case KEEP_ALIVE_MIN:
      return isSetKeep_alive_min();
    case QUERY_TIMEOUT:
      return isSetQuery_timeout();
    case MEM_LIMIT:
      return isSetMem_limit();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_cluster = true && this.isSetCluster();
    boolean that_present_cluster = true && that.isSetCluster();
    if (this_present_cluster || that_present_cluster) {
      if (!(this_present_cluster && that_present_cluster))
        return false;
      if (!this.cluster.equals(that.cluster))
        return false;
    }

    boolean this_present_database = true && this.isSetDatabase();
    boolean that_present_database = true && that.isSetDatabase();
    if (this_present_database || that_present_database) {
      if (!(this_present_database && that_present_database))
        return false;
      if (!this.database.equals(that.database))
        return false;
    }

    boolean this_present_table = true && this.isSetTable();
    boolean that_present_table = true && that.isSetTable();
    if (this_present_table || that_present_table) {
      if (!(this_present_table && that_present_table))
        return false;
      if (!this.table.equals(that.table))
        return false;
    }

    boolean this_present_tablet_ids = true && this.isSetTablet_ids();
    boolean that_present_tablet_ids = true && that.isSetTablet_ids();
    if (this_present_tablet_ids || that_present_tablet_ids) {
      if (!(this_present_tablet_ids && that_present_tablet_ids))
        return false;
      if (!this.tablet_ids.equals(that.tablet_ids))
        return false;
    }

    boolean this_present_opaqued_query_plan = true && this.isSetOpaqued_query_plan();
    boolean that_present_opaqued_query_plan = true && that.isSetOpaqued_query_plan();
    if (this_present_opaqued_query_plan || that_present_opaqued_query_plan) {
      if (!(this_present_opaqued_query_plan && that_present_opaqued_query_plan))
        return false;
      if (!this.opaqued_query_plan.equals(that.opaqued_query_plan))
        return false;
    }

    boolean this_present_batch_size = true && this.isSetBatch_size();
    boolean that_present_batch_size = true && that.isSetBatch_size();
    if (this_present_batch_size || that_present_batch_size) {
      if (!(this_present_batch_size && that_present_batch_size))
        return false;
      if (this.batch_size != that.batch_size)
        return false;
    }

    boolean this_present_properties = true && this.isSetProperties();
    boolean that_present_properties = true && that.isSetProperties();
    if (this_present_properties || that_present_properties) {
      if (!(this_present_properties && that_present_properties))
        return false;
      if (!this.properties.equals(that.properties))
        return false;
    }

    boolean this_present_limit = true && this.isSetLimit();
    boolean that_present_limit = true && that.isSetLimit();
    if (this_present_limit || that_present_limit) {
      if (!(this_present_limit && that_present_limit))
        return false;
      if (this.limit != that.limit)
        return false;
    }

    boolean this_present_user = true && this.isSetUser();
    boolean that_present_user = true && that.isSetUser();
    if (this_present_user || that_present_user) {
      if (!(this_present_user && that_present_user))
        return false;
      if (!this.user.equals(that.user))
        return false;
    }

    boolean this_present_passwd = true && this.isSetPasswd();
    boolean that_present_passwd = true && that.isSetPasswd();
    if (this_present_passwd || that_present_passwd) {
      if (!(this_present_passwd && that_present_passwd))
        return false;
      if (!this.passwd.equals(that.passwd))
        return false;
    }

    boolean this_present_keep_alive_min = true && this.isSetKeep_alive_min();
    boolean that_present_keep_alive_min = true && that.isSetKeep_alive_min();
    if (this_present_keep_alive_min || that_present_keep_alive_min) {
      if (!(this_present_keep_alive_min && that_present_keep_alive_min))
        return false;
      if (this.keep_alive_min != that.keep_alive_min)
        return false;
    }

    boolean this_present_query_timeout = true && this.isSetQuery_timeout();
    boolean that_present_query_timeout = true && that.isSetQuery_timeout();
    if (this_present_query_timeout || that_present_query_timeout) {
      if (!(this_present_query_timeout && that_present_query_timeout))
        return false;
      if (this.query_timeout != that.query_timeout)
        return false;
    }

    boolean this_present_mem_limit = true && this.isSetMem_limit();
    boolean that_present_mem_limit = true && that.isSetMem_limit();
    if (this_present_mem_limit || that_present_mem_limit) {
      if (!(this_present_mem_limit && that_present_mem_limit))
        return false;
      if (this.mem_limit != that.mem_limit)
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetCluster()) ? 131071 : 524287);
    if (isSetCluster())
      hashCode = hashCode * 8191 + cluster.hashCode();

    hashCode = hashCode * 8191 + ((isSetDatabase()) ? 131071 : 524287);
    if (isSetDatabase())
      hashCode = hashCode * 8191 + database.hashCode();

    hashCode = hashCode * 8191 + ((isSetTable()) ? 131071 : 524287);
    if (isSetTable())
      hashCode = hashCode * 8191 + table.hashCode();

    hashCode = hashCode * 8191 + ((isSetTablet_ids()) ? 131071 : 524287);
    if (isSetTablet_ids())
      hashCode = hashCode * 8191 + tablet_ids.hashCode();

    hashCode = hashCode * 8191 + ((isSetOpaqued_query_plan()) ? 131071 : 524287);
    if (isSetOpaqued_query_plan())
      hashCode = hashCode * 8191 + opaqued_query_plan.hashCode();

    hashCode = hashCode * 8191 + ((isSetBatch_size()) ? 131071 : 524287);
    if (isSetBatch_size())
      hashCode = hashCode * 8191 + batch_size;

    hashCode = hashCode * 8191 + ((isSetProperties()) ? 131071 : 524287);
    if (isSetProperties())
      hashCode = hashCode * 8191 + properties.hashCode();

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

    hashCode = hashCode * 8191 + ((isSetUser()) ? 131071 : 524287);
    if (isSetUser())
      hashCode = hashCode * 8191 + user.hashCode();

    hashCode = hashCode * 8191 + ((isSetPasswd()) ? 131071 : 524287);
    if (isSetPasswd())
      hashCode = hashCode * 8191 + passwd.hashCode();

    hashCode = hashCode * 8191 + ((isSetKeep_alive_min()) ? 131071 : 524287);
    if (isSetKeep_alive_min())
      hashCode = hashCode * 8191 + keep_alive_min;

    hashCode = hashCode * 8191 + ((isSetQuery_timeout()) ? 131071 : 524287);
    if (isSetQuery_timeout())
      hashCode = hashCode * 8191 + query_timeout;

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

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.valueOf(isSetCluster()).compareTo(other.isSetCluster());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCluster()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cluster, other.cluster);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetDatabase()).compareTo(other.isSetDatabase());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDatabase()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.database, other.database);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTable()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetTablet_ids()).compareTo(other.isSetTablet_ids());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTablet_ids()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablet_ids, other.tablet_ids);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetOpaqued_query_plan()).compareTo(other.isSetOpaqued_query_plan());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOpaqued_query_plan()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.opaqued_query_plan, other.opaqued_query_plan);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetBatch_size()).compareTo(other.isSetBatch_size());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBatch_size()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batch_size, other.batch_size);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetProperties()).compareTo(other.isSetProperties());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetProperties()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.properties, other.properties);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetLimit()).compareTo(other.isSetLimit());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLimit()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.limit, other.limit);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetUser()).compareTo(other.isSetUser());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUser()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetPasswd()).compareTo(other.isSetPasswd());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPasswd()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.passwd, other.passwd);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetKeep_alive_min()).compareTo(other.isSetKeep_alive_min());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetKeep_alive_min()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keep_alive_min, other.keep_alive_min);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetQuery_timeout()).compareTo(other.isSetQuery_timeout());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetQuery_timeout()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query_timeout, other.query_timeout);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetMem_limit()).compareTo(other.isSetMem_limit());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMem_limit()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mem_limit, other.mem_limit);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  @org.apache.thrift.annotation.Nullable
  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    scheme(iprot).read(iprot, this);
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    scheme(oprot).write(oprot, this);
  }

  @Override
  public java.lang.String toString() {
    java.lang.StringBuilder sb = new java.lang.StringBuilder("TScanOpenParams(");
    boolean first = true;

    sb.append("cluster:");
    if (this.cluster == null) {
      sb.append("null");
    } else {
      sb.append(this.cluster);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("database:");
    if (this.database == null) {
      sb.append("null");
    } else {
      sb.append(this.database);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("table:");
    if (this.table == null) {
      sb.append("null");
    } else {
      sb.append(this.table);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("tablet_ids:");
    if (this.tablet_ids == null) {
      sb.append("null");
    } else {
      sb.append(this.tablet_ids);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("opaqued_query_plan:");
    if (this.opaqued_query_plan == null) {
      sb.append("null");
    } else {
      sb.append(this.opaqued_query_plan);
    }
    first = false;
    if (isSetBatch_size()) {
      if (!first) sb.append(", ");
      sb.append("batch_size:");
      sb.append(this.batch_size);
      first = false;
    }
    if (isSetProperties()) {
      if (!first) sb.append(", ");
      sb.append("properties:");
      if (this.properties == null) {
        sb.append("null");
      } else {
        sb.append(this.properties);
      }
      first = false;
    }
    if (isSetLimit()) {
      if (!first) sb.append(", ");
      sb.append("limit:");
      sb.append(this.limit);
      first = false;
    }
    if (isSetUser()) {
      if (!first) sb.append(", ");
      sb.append("user:");
      if (this.user == null) {
        sb.append("null");
      } else {
        sb.append(this.user);
      }
      first = false;
    }
    if (isSetPasswd()) {
      if (!first) sb.append(", ");
      sb.append("passwd:");
      if (this.passwd == null) {
        sb.append("null");
      } else {
        sb.append(this.passwd);
      }
      first = false;
    }
    if (isSetKeep_alive_min()) {
      if (!first) sb.append(", ");
      sb.append("keep_alive_min:");
      sb.append(this.keep_alive_min);
      first = false;
    }
    if (isSetQuery_timeout()) {
      if (!first) sb.append(", ");
      sb.append("query_timeout:");
      sb.append(this.query_timeout);
      first = false;
    }
    if (isSetMem_limit()) {
      if (!first) sb.append(", ");
      sb.append("mem_limit:");
      sb.append(this.mem_limit);
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    if (cluster == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'cluster' was not present! Struct: " + toString());
    }
    if (database == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'database' was not present! Struct: " + toString());
    }
    if (table == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
    }
    if (tablet_ids == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablet_ids' was not present! Struct: " + toString());
    }
    if (opaqued_query_plan == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'opaqued_query_plan' was not present! Struct: " + toString());
    }
    // 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 TScanOpenParamsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TScanOpenParamsStandardScheme getScheme() {
      return new TScanOpenParamsStandardScheme();
    }
  }

  private static class TScanOpenParamsStandardScheme extends org.apache.thrift.scheme.StandardScheme {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TScanOpenParams 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: // CLUSTER
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.cluster = iprot.readString();
              struct.setClusterIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // DATABASE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.database = iprot.readString();
              struct.setDatabaseIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // TABLE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.table = iprot.readString();
              struct.setTableIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // TABLET_IDS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
                struct.tablet_ids = new java.util.ArrayList(_list0.size);
                long _elem1;
                for (int _i2 = 0; _i2 < _list0.size; ++_i2)
                {
                  _elem1 = iprot.readI64();
                  struct.tablet_ids.add(_elem1);
                }
                iprot.readListEnd();
              }
              struct.setTablet_idsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // OPAQUED_QUERY_PLAN
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.opaqued_query_plan = iprot.readString();
              struct.setOpaqued_query_planIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // BATCH_SIZE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.batch_size = iprot.readI32();
              struct.setBatch_sizeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // PROPERTIES
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map3 = iprot.readMapBegin();
                struct.properties = new java.util.HashMap(2*_map3.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _key4;
                @org.apache.thrift.annotation.Nullable java.lang.String _val5;
                for (int _i6 = 0; _i6 < _map3.size; ++_i6)
                {
                  _key4 = iprot.readString();
                  _val5 = iprot.readString();
                  struct.properties.put(_key4, _val5);
                }
                iprot.readMapEnd();
              }
              struct.setPropertiesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // LIMIT
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.limit = iprot.readI64();
              struct.setLimitIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // USER
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.user = iprot.readString();
              struct.setUserIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // PASSWD
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.passwd = iprot.readString();
              struct.setPasswdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // KEEP_ALIVE_MIN
            if (schemeField.type == org.apache.thrift.protocol.TType.I16) {
              struct.keep_alive_min = iprot.readI16();
              struct.setKeep_alive_minIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 12: // QUERY_TIMEOUT
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.query_timeout = iprot.readI32();
              struct.setQuery_timeoutIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 13: // MEM_LIMIT
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.mem_limit = iprot.readI64();
              struct.setMem_limitIsSet(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, TScanOpenParams struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.cluster != null) {
        oprot.writeFieldBegin(CLUSTER_FIELD_DESC);
        oprot.writeString(struct.cluster);
        oprot.writeFieldEnd();
      }
      if (struct.database != null) {
        oprot.writeFieldBegin(DATABASE_FIELD_DESC);
        oprot.writeString(struct.database);
        oprot.writeFieldEnd();
      }
      if (struct.table != null) {
        oprot.writeFieldBegin(TABLE_FIELD_DESC);
        oprot.writeString(struct.table);
        oprot.writeFieldEnd();
      }
      if (struct.tablet_ids != null) {
        oprot.writeFieldBegin(TABLET_IDS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.tablet_ids.size()));
          for (long _iter7 : struct.tablet_ids)
          {
            oprot.writeI64(_iter7);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.opaqued_query_plan != null) {
        oprot.writeFieldBegin(OPAQUED_QUERY_PLAN_FIELD_DESC);
        oprot.writeString(struct.opaqued_query_plan);
        oprot.writeFieldEnd();
      }
      if (struct.isSetBatch_size()) {
        oprot.writeFieldBegin(BATCH_SIZE_FIELD_DESC);
        oprot.writeI32(struct.batch_size);
        oprot.writeFieldEnd();
      }
      if (struct.properties != null) {
        if (struct.isSetProperties()) {
          oprot.writeFieldBegin(PROPERTIES_FIELD_DESC);
          {
            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.properties.size()));
            for (java.util.Map.Entry _iter8 : struct.properties.entrySet())
            {
              oprot.writeString(_iter8.getKey());
              oprot.writeString(_iter8.getValue());
            }
            oprot.writeMapEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetLimit()) {
        oprot.writeFieldBegin(LIMIT_FIELD_DESC);
        oprot.writeI64(struct.limit);
        oprot.writeFieldEnd();
      }
      if (struct.user != null) {
        if (struct.isSetUser()) {
          oprot.writeFieldBegin(USER_FIELD_DESC);
          oprot.writeString(struct.user);
          oprot.writeFieldEnd();
        }
      }
      if (struct.passwd != null) {
        if (struct.isSetPasswd()) {
          oprot.writeFieldBegin(PASSWD_FIELD_DESC);
          oprot.writeString(struct.passwd);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetKeep_alive_min()) {
        oprot.writeFieldBegin(KEEP_ALIVE_MIN_FIELD_DESC);
        oprot.writeI16(struct.keep_alive_min);
        oprot.writeFieldEnd();
      }
      if (struct.isSetQuery_timeout()) {
        oprot.writeFieldBegin(QUERY_TIMEOUT_FIELD_DESC);
        oprot.writeI32(struct.query_timeout);
        oprot.writeFieldEnd();
      }
      if (struct.isSetMem_limit()) {
        oprot.writeFieldBegin(MEM_LIMIT_FIELD_DESC);
        oprot.writeI64(struct.mem_limit);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TScanOpenParamsTupleScheme extends org.apache.thrift.scheme.TupleScheme {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TScanOpenParams struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      oprot.writeString(struct.cluster);
      oprot.writeString(struct.database);
      oprot.writeString(struct.table);
      {
        oprot.writeI32(struct.tablet_ids.size());
        for (long _iter9 : struct.tablet_ids)
        {
          oprot.writeI64(_iter9);
        }
      }
      oprot.writeString(struct.opaqued_query_plan);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetBatch_size()) {
        optionals.set(0);
      }
      if (struct.isSetProperties()) {
        optionals.set(1);
      }
      if (struct.isSetLimit()) {
        optionals.set(2);
      }
      if (struct.isSetUser()) {
        optionals.set(3);
      }
      if (struct.isSetPasswd()) {
        optionals.set(4);
      }
      if (struct.isSetKeep_alive_min()) {
        optionals.set(5);
      }
      if (struct.isSetQuery_timeout()) {
        optionals.set(6);
      }
      if (struct.isSetMem_limit()) {
        optionals.set(7);
      }
      oprot.writeBitSet(optionals, 8);
      if (struct.isSetBatch_size()) {
        oprot.writeI32(struct.batch_size);
      }
      if (struct.isSetProperties()) {
        {
          oprot.writeI32(struct.properties.size());
          for (java.util.Map.Entry _iter10 : struct.properties.entrySet())
          {
            oprot.writeString(_iter10.getKey());
            oprot.writeString(_iter10.getValue());
          }
        }
      }
      if (struct.isSetLimit()) {
        oprot.writeI64(struct.limit);
      }
      if (struct.isSetUser()) {
        oprot.writeString(struct.user);
      }
      if (struct.isSetPasswd()) {
        oprot.writeString(struct.passwd);
      }
      if (struct.isSetKeep_alive_min()) {
        oprot.writeI16(struct.keep_alive_min);
      }
      if (struct.isSetQuery_timeout()) {
        oprot.writeI32(struct.query_timeout);
      }
      if (struct.isSetMem_limit()) {
        oprot.writeI64(struct.mem_limit);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TScanOpenParams struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.cluster = iprot.readString();
      struct.setClusterIsSet(true);
      struct.database = iprot.readString();
      struct.setDatabaseIsSet(true);
      struct.table = iprot.readString();
      struct.setTableIsSet(true);
      {
        org.apache.thrift.protocol.TList _list11 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
        struct.tablet_ids = new java.util.ArrayList(_list11.size);
        long _elem12;
        for (int _i13 = 0; _i13 < _list11.size; ++_i13)
        {
          _elem12 = iprot.readI64();
          struct.tablet_ids.add(_elem12);
        }
      }
      struct.setTablet_idsIsSet(true);
      struct.opaqued_query_plan = iprot.readString();
      struct.setOpaqued_query_planIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(8);
      if (incoming.get(0)) {
        struct.batch_size = iprot.readI32();
        struct.setBatch_sizeIsSet(true);
      }
      if (incoming.get(1)) {
        {
          org.apache.thrift.protocol.TMap _map14 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.properties = new java.util.HashMap(2*_map14.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _key15;
          @org.apache.thrift.annotation.Nullable java.lang.String _val16;
          for (int _i17 = 0; _i17 < _map14.size; ++_i17)
          {
            _key15 = iprot.readString();
            _val16 = iprot.readString();
            struct.properties.put(_key15, _val16);
          }
        }
        struct.setPropertiesIsSet(true);
      }
      if (incoming.get(2)) {
        struct.limit = iprot.readI64();
        struct.setLimitIsSet(true);
      }
      if (incoming.get(3)) {
        struct.user = iprot.readString();
        struct.setUserIsSet(true);
      }
      if (incoming.get(4)) {
        struct.passwd = iprot.readString();
        struct.setPasswdIsSet(true);
      }
      if (incoming.get(5)) {
        struct.keep_alive_min = iprot.readI16();
        struct.setKeep_alive_minIsSet(true);
      }
      if (incoming.get(6)) {
        struct.query_timeout = iprot.readI32();
        struct.setQuery_timeoutIsSet(true);
      }
      if (incoming.get(7)) {
        struct.mem_limit = iprot.readI64();
        struct.setMem_limitIsSet(true);
      }
    }
  }

  private static  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();
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy