org.apache.iotdb.mpp.rpc.thrift.TFetchWindowBatchReq Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of timechodb-thrift Show documentation
Show all versions of timechodb-thrift Show documentation
RPC (Thrift) framework for client and DataNodes.
The newest version!
/**
* Autogenerated by Thrift Compiler (0.14.1)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.iotdb.mpp.rpc.thrift;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.14.1)", date = "2024-09-12")
public class TFetchWindowBatchReq 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("TFetchWindowBatchReq");
private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField STATEMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("statementId", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField QUERY_EXPRESSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("queryExpressions", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField GROUP_BY_TIME_PARAMETER_FIELD_DESC = new org.apache.thrift.protocol.TField("groupByTimeParameter", org.apache.thrift.protocol.TType.STRUCT, (short)4);
private static final org.apache.thrift.protocol.TField QUERY_FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("queryFilter", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField FETCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fetchSize", org.apache.thrift.protocol.TType.I32, (short)6);
private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I64, (short)7);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TFetchWindowBatchReqStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TFetchWindowBatchReqTupleSchemeFactory();
public long sessionId; // required
public long statementId; // required
public @org.apache.thrift.annotation.Nullable java.util.List queryExpressions; // required
public @org.apache.thrift.annotation.Nullable TGroupByTimeParameter groupByTimeParameter; // required
public @org.apache.thrift.annotation.Nullable java.lang.String queryFilter; // optional
public int fetchSize; // optional
public long timeout; // 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 {
SESSION_ID((short)1, "sessionId"),
STATEMENT_ID((short)2, "statementId"),
QUERY_EXPRESSIONS((short)3, "queryExpressions"),
GROUP_BY_TIME_PARAMETER((short)4, "groupByTimeParameter"),
QUERY_FILTER((short)5, "queryFilter"),
FETCH_SIZE((short)6, "fetchSize"),
TIMEOUT((short)7, "timeout");
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: // SESSION_ID
return SESSION_ID;
case 2: // STATEMENT_ID
return STATEMENT_ID;
case 3: // QUERY_EXPRESSIONS
return QUERY_EXPRESSIONS;
case 4: // GROUP_BY_TIME_PARAMETER
return GROUP_BY_TIME_PARAMETER;
case 5: // QUERY_FILTER
return QUERY_FILTER;
case 6: // FETCH_SIZE
return FETCH_SIZE;
case 7: // TIMEOUT
return TIMEOUT;
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 __SESSIONID_ISSET_ID = 0;
private static final int __STATEMENTID_ISSET_ID = 1;
private static final int __FETCHSIZE_ISSET_ID = 2;
private static final int __TIMEOUT_ISSET_ID = 3;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.QUERY_FILTER,_Fields.FETCH_SIZE,_Fields.TIMEOUT};
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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.STATEMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("statementId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.QUERY_EXPRESSIONS, new org.apache.thrift.meta_data.FieldMetaData("queryExpressions", 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.STRING))));
tmpMap.put(_Fields.GROUP_BY_TIME_PARAMETER, new org.apache.thrift.meta_data.FieldMetaData("groupByTimeParameter", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "TGroupByTimeParameter")));
tmpMap.put(_Fields.QUERY_FILTER, new org.apache.thrift.meta_data.FieldMetaData("queryFilter", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.FETCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fetchSize", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", 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(TFetchWindowBatchReq.class, metaDataMap);
}
public TFetchWindowBatchReq() {
}
public TFetchWindowBatchReq(
long sessionId,
long statementId,
java.util.List queryExpressions,
TGroupByTimeParameter groupByTimeParameter)
{
this();
this.sessionId = sessionId;
setSessionIdIsSet(true);
this.statementId = statementId;
setStatementIdIsSet(true);
this.queryExpressions = queryExpressions;
this.groupByTimeParameter = groupByTimeParameter;
}
/**
* Performs a deep copy on other.
*/
public TFetchWindowBatchReq(TFetchWindowBatchReq other) {
__isset_bitfield = other.__isset_bitfield;
this.sessionId = other.sessionId;
this.statementId = other.statementId;
if (other.isSetQueryExpressions()) {
java.util.List __this__queryExpressions = new java.util.ArrayList(other.queryExpressions);
this.queryExpressions = __this__queryExpressions;
}
if (other.isSetGroupByTimeParameter()) {
this.groupByTimeParameter = new TGroupByTimeParameter(other.groupByTimeParameter);
}
if (other.isSetQueryFilter()) {
this.queryFilter = other.queryFilter;
}
this.fetchSize = other.fetchSize;
this.timeout = other.timeout;
}
public TFetchWindowBatchReq deepCopy() {
return new TFetchWindowBatchReq(this);
}
@Override
public void clear() {
setSessionIdIsSet(false);
this.sessionId = 0;
setStatementIdIsSet(false);
this.statementId = 0;
this.queryExpressions = null;
this.groupByTimeParameter = null;
this.queryFilter = null;
setFetchSizeIsSet(false);
this.fetchSize = 0;
setTimeoutIsSet(false);
this.timeout = 0;
}
public long getSessionId() {
return this.sessionId;
}
public TFetchWindowBatchReq setSessionId(long sessionId) {
this.sessionId = sessionId;
setSessionIdIsSet(true);
return this;
}
public void unsetSessionId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID);
}
/** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
public boolean isSetSessionId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID);
}
public void setSessionIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value);
}
public long getStatementId() {
return this.statementId;
}
public TFetchWindowBatchReq setStatementId(long statementId) {
this.statementId = statementId;
setStatementIdIsSet(true);
return this;
}
public void unsetStatementId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATEMENTID_ISSET_ID);
}
/** Returns true if field statementId is set (has been assigned a value) and false otherwise */
public boolean isSetStatementId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATEMENTID_ISSET_ID);
}
public void setStatementIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATEMENTID_ISSET_ID, value);
}
public int getQueryExpressionsSize() {
return (this.queryExpressions == null) ? 0 : this.queryExpressions.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator getQueryExpressionsIterator() {
return (this.queryExpressions == null) ? null : this.queryExpressions.iterator();
}
public void addToQueryExpressions(java.lang.String elem) {
if (this.queryExpressions == null) {
this.queryExpressions = new java.util.ArrayList();
}
this.queryExpressions.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List getQueryExpressions() {
return this.queryExpressions;
}
public TFetchWindowBatchReq setQueryExpressions(@org.apache.thrift.annotation.Nullable java.util.List queryExpressions) {
this.queryExpressions = queryExpressions;
return this;
}
public void unsetQueryExpressions() {
this.queryExpressions = null;
}
/** Returns true if field queryExpressions is set (has been assigned a value) and false otherwise */
public boolean isSetQueryExpressions() {
return this.queryExpressions != null;
}
public void setQueryExpressionsIsSet(boolean value) {
if (!value) {
this.queryExpressions = null;
}
}
@org.apache.thrift.annotation.Nullable
public TGroupByTimeParameter getGroupByTimeParameter() {
return this.groupByTimeParameter;
}
public TFetchWindowBatchReq setGroupByTimeParameter(@org.apache.thrift.annotation.Nullable TGroupByTimeParameter groupByTimeParameter) {
this.groupByTimeParameter = groupByTimeParameter;
return this;
}
public void unsetGroupByTimeParameter() {
this.groupByTimeParameter = null;
}
/** Returns true if field groupByTimeParameter is set (has been assigned a value) and false otherwise */
public boolean isSetGroupByTimeParameter() {
return this.groupByTimeParameter != null;
}
public void setGroupByTimeParameterIsSet(boolean value) {
if (!value) {
this.groupByTimeParameter = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getQueryFilter() {
return this.queryFilter;
}
public TFetchWindowBatchReq setQueryFilter(@org.apache.thrift.annotation.Nullable java.lang.String queryFilter) {
this.queryFilter = queryFilter;
return this;
}
public void unsetQueryFilter() {
this.queryFilter = null;
}
/** Returns true if field queryFilter is set (has been assigned a value) and false otherwise */
public boolean isSetQueryFilter() {
return this.queryFilter != null;
}
public void setQueryFilterIsSet(boolean value) {
if (!value) {
this.queryFilter = null;
}
}
public int getFetchSize() {
return this.fetchSize;
}
public TFetchWindowBatchReq setFetchSize(int fetchSize) {
this.fetchSize = fetchSize;
setFetchSizeIsSet(true);
return this;
}
public void unsetFetchSize() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FETCHSIZE_ISSET_ID);
}
/** Returns true if field fetchSize is set (has been assigned a value) and false otherwise */
public boolean isSetFetchSize() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FETCHSIZE_ISSET_ID);
}
public void setFetchSizeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FETCHSIZE_ISSET_ID, value);
}
public long getTimeout() {
return this.timeout;
}
public TFetchWindowBatchReq setTimeout(long timeout) {
this.timeout = timeout;
setTimeoutIsSet(true);
return this;
}
public void unsetTimeout() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID);
}
/** Returns true if field timeout is set (has been assigned a value) and false otherwise */
public boolean isSetTimeout() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID);
}
public void setTimeoutIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value);
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SESSION_ID:
if (value == null) {
unsetSessionId();
} else {
setSessionId((java.lang.Long)value);
}
break;
case STATEMENT_ID:
if (value == null) {
unsetStatementId();
} else {
setStatementId((java.lang.Long)value);
}
break;
case QUERY_EXPRESSIONS:
if (value == null) {
unsetQueryExpressions();
} else {
setQueryExpressions((java.util.List)value);
}
break;
case GROUP_BY_TIME_PARAMETER:
if (value == null) {
unsetGroupByTimeParameter();
} else {
setGroupByTimeParameter((TGroupByTimeParameter)value);
}
break;
case QUERY_FILTER:
if (value == null) {
unsetQueryFilter();
} else {
setQueryFilter((java.lang.String)value);
}
break;
case FETCH_SIZE:
if (value == null) {
unsetFetchSize();
} else {
setFetchSize((java.lang.Integer)value);
}
break;
case TIMEOUT:
if (value == null) {
unsetTimeout();
} else {
setTimeout((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_ID:
return getSessionId();
case STATEMENT_ID:
return getStatementId();
case QUERY_EXPRESSIONS:
return getQueryExpressions();
case GROUP_BY_TIME_PARAMETER:
return getGroupByTimeParameter();
case QUERY_FILTER:
return getQueryFilter();
case FETCH_SIZE:
return getFetchSize();
case TIMEOUT:
return getTimeout();
}
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 SESSION_ID:
return isSetSessionId();
case STATEMENT_ID:
return isSetStatementId();
case QUERY_EXPRESSIONS:
return isSetQueryExpressions();
case GROUP_BY_TIME_PARAMETER:
return isSetGroupByTimeParameter();
case QUERY_FILTER:
return isSetQueryFilter();
case FETCH_SIZE:
return isSetFetchSize();
case TIMEOUT:
return isSetTimeout();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TFetchWindowBatchReq)
return this.equals((TFetchWindowBatchReq)that);
return false;
}
public boolean equals(TFetchWindowBatchReq that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_sessionId = true;
boolean that_present_sessionId = true;
if (this_present_sessionId || that_present_sessionId) {
if (!(this_present_sessionId && that_present_sessionId))
return false;
if (this.sessionId != that.sessionId)
return false;
}
boolean this_present_statementId = true;
boolean that_present_statementId = true;
if (this_present_statementId || that_present_statementId) {
if (!(this_present_statementId && that_present_statementId))
return false;
if (this.statementId != that.statementId)
return false;
}
boolean this_present_queryExpressions = true && this.isSetQueryExpressions();
boolean that_present_queryExpressions = true && that.isSetQueryExpressions();
if (this_present_queryExpressions || that_present_queryExpressions) {
if (!(this_present_queryExpressions && that_present_queryExpressions))
return false;
if (!this.queryExpressions.equals(that.queryExpressions))
return false;
}
boolean this_present_groupByTimeParameter = true && this.isSetGroupByTimeParameter();
boolean that_present_groupByTimeParameter = true && that.isSetGroupByTimeParameter();
if (this_present_groupByTimeParameter || that_present_groupByTimeParameter) {
if (!(this_present_groupByTimeParameter && that_present_groupByTimeParameter))
return false;
if (!this.groupByTimeParameter.equals(that.groupByTimeParameter))
return false;
}
boolean this_present_queryFilter = true && this.isSetQueryFilter();
boolean that_present_queryFilter = true && that.isSetQueryFilter();
if (this_present_queryFilter || that_present_queryFilter) {
if (!(this_present_queryFilter && that_present_queryFilter))
return false;
if (!this.queryFilter.equals(that.queryFilter))
return false;
}
boolean this_present_fetchSize = true && this.isSetFetchSize();
boolean that_present_fetchSize = true && that.isSetFetchSize();
if (this_present_fetchSize || that_present_fetchSize) {
if (!(this_present_fetchSize && that_present_fetchSize))
return false;
if (this.fetchSize != that.fetchSize)
return false;
}
boolean this_present_timeout = true && this.isSetTimeout();
boolean that_present_timeout = true && that.isSetTimeout();
if (this_present_timeout || that_present_timeout) {
if (!(this_present_timeout && that_present_timeout))
return false;
if (this.timeout != that.timeout)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(statementId);
hashCode = hashCode * 8191 + ((isSetQueryExpressions()) ? 131071 : 524287);
if (isSetQueryExpressions())
hashCode = hashCode * 8191 + queryExpressions.hashCode();
hashCode = hashCode * 8191 + ((isSetGroupByTimeParameter()) ? 131071 : 524287);
if (isSetGroupByTimeParameter())
hashCode = hashCode * 8191 + groupByTimeParameter.hashCode();
hashCode = hashCode * 8191 + ((isSetQueryFilter()) ? 131071 : 524287);
if (isSetQueryFilter())
hashCode = hashCode * 8191 + queryFilter.hashCode();
hashCode = hashCode * 8191 + ((isSetFetchSize()) ? 131071 : 524287);
if (isSetFetchSize())
hashCode = hashCode * 8191 + fetchSize;
hashCode = hashCode * 8191 + ((isSetTimeout()) ? 131071 : 524287);
if (isSetTimeout())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeout);
return hashCode;
}
@Override
public int compareTo(TFetchWindowBatchReq other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSessionId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetStatementId(), other.isSetStatementId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStatementId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statementId, other.statementId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetQueryExpressions(), other.isSetQueryExpressions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQueryExpressions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryExpressions, other.queryExpressions);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetGroupByTimeParameter(), other.isSetGroupByTimeParameter());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGroupByTimeParameter()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupByTimeParameter, other.groupByTimeParameter);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetQueryFilter(), other.isSetQueryFilter());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQueryFilter()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryFilter, other.queryFilter);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetFetchSize(), other.isSetFetchSize());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFetchSize()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchSize, other.fetchSize);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTimeout(), other.isSetTimeout());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimeout()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout);
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("TFetchWindowBatchReq(");
boolean first = true;
sb.append("sessionId:");
sb.append(this.sessionId);
first = false;
if (!first) sb.append(", ");
sb.append("statementId:");
sb.append(this.statementId);
first = false;
if (!first) sb.append(", ");
sb.append("queryExpressions:");
if (this.queryExpressions == null) {
sb.append("null");
} else {
sb.append(this.queryExpressions);
}
first = false;
if (!first) sb.append(", ");
sb.append("groupByTimeParameter:");
if (this.groupByTimeParameter == null) {
sb.append("null");
} else {
sb.append(this.groupByTimeParameter);
}
first = false;
if (isSetQueryFilter()) {
if (!first) sb.append(", ");
sb.append("queryFilter:");
if (this.queryFilter == null) {
sb.append("null");
} else {
sb.append(this.queryFilter);
}
first = false;
}
if (isSetFetchSize()) {
if (!first) sb.append(", ");
sb.append("fetchSize:");
sb.append(this.fetchSize);
first = false;
}
if (isSetTimeout()) {
if (!first) sb.append(", ");
sb.append("timeout:");
sb.append(this.timeout);
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'statementId' because it's a primitive and you chose the non-beans generator.
if (queryExpressions == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'queryExpressions' was not present! Struct: " + toString());
}
if (groupByTimeParameter == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'groupByTimeParameter' 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 TFetchWindowBatchReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TFetchWindowBatchReqStandardScheme getScheme() {
return new TFetchWindowBatchReqStandardScheme();
}
}
private static class TFetchWindowBatchReqStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, TFetchWindowBatchReq 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: // SESSION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.sessionId = iprot.readI64();
struct.setSessionIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // STATEMENT_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.statementId = iprot.readI64();
struct.setStatementIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // QUERY_EXPRESSIONS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list552 = iprot.readListBegin();
struct.queryExpressions = new java.util.ArrayList(_list552.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem553;
for (int _i554 = 0; _i554 < _list552.size; ++_i554)
{
_elem553 = iprot.readString();
struct.queryExpressions.add(_elem553);
}
iprot.readListEnd();
}
struct.setQueryExpressionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // GROUP_BY_TIME_PARAMETER
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.groupByTimeParameter = new TGroupByTimeParameter();
struct.groupByTimeParameter.read(iprot);
struct.setGroupByTimeParameterIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // QUERY_FILTER
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.queryFilter = iprot.readString();
struct.setQueryFilterIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // FETCH_SIZE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.fetchSize = iprot.readI32();
struct.setFetchSizeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // TIMEOUT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.timeout = iprot.readI64();
struct.setTimeoutIsSet(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.isSetSessionId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetStatementId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'statementId' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TFetchWindowBatchReq struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
oprot.writeI64(struct.sessionId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(STATEMENT_ID_FIELD_DESC);
oprot.writeI64(struct.statementId);
oprot.writeFieldEnd();
if (struct.queryExpressions != null) {
oprot.writeFieldBegin(QUERY_EXPRESSIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.queryExpressions.size()));
for (java.lang.String _iter555 : struct.queryExpressions)
{
oprot.writeString(_iter555);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.groupByTimeParameter != null) {
oprot.writeFieldBegin(GROUP_BY_TIME_PARAMETER_FIELD_DESC);
struct.groupByTimeParameter.write(oprot);
oprot.writeFieldEnd();
}
if (struct.queryFilter != null) {
if (struct.isSetQueryFilter()) {
oprot.writeFieldBegin(QUERY_FILTER_FIELD_DESC);
oprot.writeString(struct.queryFilter);
oprot.writeFieldEnd();
}
}
if (struct.isSetFetchSize()) {
oprot.writeFieldBegin(FETCH_SIZE_FIELD_DESC);
oprot.writeI32(struct.fetchSize);
oprot.writeFieldEnd();
}
if (struct.isSetTimeout()) {
oprot.writeFieldBegin(TIMEOUT_FIELD_DESC);
oprot.writeI64(struct.timeout);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TFetchWindowBatchReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TFetchWindowBatchReqTupleScheme getScheme() {
return new TFetchWindowBatchReqTupleScheme();
}
}
private static class TFetchWindowBatchReqTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TFetchWindowBatchReq struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.sessionId);
oprot.writeI64(struct.statementId);
{
oprot.writeI32(struct.queryExpressions.size());
for (java.lang.String _iter556 : struct.queryExpressions)
{
oprot.writeString(_iter556);
}
}
struct.groupByTimeParameter.write(oprot);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetQueryFilter()) {
optionals.set(0);
}
if (struct.isSetFetchSize()) {
optionals.set(1);
}
if (struct.isSetTimeout()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetQueryFilter()) {
oprot.writeString(struct.queryFilter);
}
if (struct.isSetFetchSize()) {
oprot.writeI32(struct.fetchSize);
}
if (struct.isSetTimeout()) {
oprot.writeI64(struct.timeout);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TFetchWindowBatchReq struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.sessionId = iprot.readI64();
struct.setSessionIdIsSet(true);
struct.statementId = iprot.readI64();
struct.setStatementIdIsSet(true);
{
org.apache.thrift.protocol.TList _list557 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.queryExpressions = new java.util.ArrayList(_list557.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem558;
for (int _i559 = 0; _i559 < _list557.size; ++_i559)
{
_elem558 = iprot.readString();
struct.queryExpressions.add(_elem558);
}
}
struct.setQueryExpressionsIsSet(true);
struct.groupByTimeParameter = new TGroupByTimeParameter();
struct.groupByTimeParameter.read(iprot);
struct.setGroupByTimeParameterIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.queryFilter = iprot.readString();
struct.setQueryFilterIsSet(true);
}
if (incoming.get(1)) {
struct.fetchSize = iprot.readI32();
struct.setFetchSizeIsSet(true);
}
if (incoming.get(2)) {
struct.timeout = iprot.readI64();
struct.setTimeoutIsSet(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();
}
}