org.apache.iotdb.mpp.rpc.thrift.TFetchTimeseriesResp 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 TFetchTimeseriesResp 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("TFetchTimeseriesResp");
private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField QUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("queryId", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField COLUMN_NAME_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("columnNameList", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField COLUMN_TYPE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("columnTypeList", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final org.apache.thrift.protocol.TField COLUMN_NAME_INDEX_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("columnNameIndexMap", org.apache.thrift.protocol.TType.MAP, (short)5);
private static final org.apache.thrift.protocol.TField TS_DATASET_FIELD_DESC = new org.apache.thrift.protocol.TField("tsDataset", org.apache.thrift.protocol.TType.LIST, (short)6);
private static final org.apache.thrift.protocol.TField HAS_MORE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("hasMoreData", org.apache.thrift.protocol.TType.BOOL, (short)7);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TFetchTimeseriesRespStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TFetchTimeseriesRespTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required
public long queryId; // optional
public @org.apache.thrift.annotation.Nullable java.util.List columnNameList; // optional
public @org.apache.thrift.annotation.Nullable java.util.List columnTypeList; // optional
public @org.apache.thrift.annotation.Nullable java.util.Map columnNameIndexMap; // optional
public @org.apache.thrift.annotation.Nullable java.util.List tsDataset; // optional
public boolean hasMoreData; // 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 {
STATUS((short)1, "status"),
QUERY_ID((short)2, "queryId"),
COLUMN_NAME_LIST((short)3, "columnNameList"),
COLUMN_TYPE_LIST((short)4, "columnTypeList"),
COLUMN_NAME_INDEX_MAP((short)5, "columnNameIndexMap"),
TS_DATASET((short)6, "tsDataset"),
HAS_MORE_DATA((short)7, "hasMoreData");
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: // STATUS
return STATUS;
case 2: // QUERY_ID
return QUERY_ID;
case 3: // COLUMN_NAME_LIST
return COLUMN_NAME_LIST;
case 4: // COLUMN_TYPE_LIST
return COLUMN_TYPE_LIST;
case 5: // COLUMN_NAME_INDEX_MAP
return COLUMN_NAME_INDEX_MAP;
case 6: // TS_DATASET
return TS_DATASET;
case 7: // HAS_MORE_DATA
return HAS_MORE_DATA;
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 __QUERYID_ISSET_ID = 0;
private static final int __HASMOREDATA_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.QUERY_ID,_Fields.COLUMN_NAME_LIST,_Fields.COLUMN_TYPE_LIST,_Fields.COLUMN_NAME_INDEX_MAP,_Fields.TS_DATASET,_Fields.HAS_MORE_DATA};
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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class)));
tmpMap.put(_Fields.QUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("queryId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.COLUMN_NAME_LIST, new org.apache.thrift.meta_data.FieldMetaData("columnNameList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.COLUMN_TYPE_LIST, new org.apache.thrift.meta_data.FieldMetaData("columnTypeList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.COLUMN_NAME_INDEX_MAP, new org.apache.thrift.meta_data.FieldMetaData("columnNameIndexMap", 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.I32))));
tmpMap.put(_Fields.TS_DATASET, new org.apache.thrift.meta_data.FieldMetaData("tsDataset", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
tmpMap.put(_Fields.HAS_MORE_DATA, new org.apache.thrift.meta_data.FieldMetaData("hasMoreData", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TFetchTimeseriesResp.class, metaDataMap);
}
public TFetchTimeseriesResp() {
}
public TFetchTimeseriesResp(
org.apache.iotdb.common.rpc.thrift.TSStatus status)
{
this();
this.status = status;
}
/**
* Performs a deep copy on other.
*/
public TFetchTimeseriesResp(TFetchTimeseriesResp other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetStatus()) {
this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status);
}
this.queryId = other.queryId;
if (other.isSetColumnNameList()) {
java.util.List __this__columnNameList = new java.util.ArrayList(other.columnNameList);
this.columnNameList = __this__columnNameList;
}
if (other.isSetColumnTypeList()) {
java.util.List __this__columnTypeList = new java.util.ArrayList(other.columnTypeList);
this.columnTypeList = __this__columnTypeList;
}
if (other.isSetColumnNameIndexMap()) {
java.util.Map __this__columnNameIndexMap = new java.util.HashMap(other.columnNameIndexMap);
this.columnNameIndexMap = __this__columnNameIndexMap;
}
if (other.isSetTsDataset()) {
java.util.List __this__tsDataset = new java.util.ArrayList(other.tsDataset);
this.tsDataset = __this__tsDataset;
}
this.hasMoreData = other.hasMoreData;
}
public TFetchTimeseriesResp deepCopy() {
return new TFetchTimeseriesResp(this);
}
@Override
public void clear() {
this.status = null;
setQueryIdIsSet(false);
this.queryId = 0;
this.columnNameList = null;
this.columnTypeList = null;
this.columnNameIndexMap = null;
this.tsDataset = null;
setHasMoreDataIsSet(false);
this.hasMoreData = false;
}
@org.apache.thrift.annotation.Nullable
public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() {
return this.status;
}
public TFetchTimeseriesResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status) {
this.status = status;
return this;
}
public void unsetStatus() {
this.status = null;
}
/** Returns true if field status is set (has been assigned a value) and false otherwise */
public boolean isSetStatus() {
return this.status != null;
}
public void setStatusIsSet(boolean value) {
if (!value) {
this.status = null;
}
}
public long getQueryId() {
return this.queryId;
}
public TFetchTimeseriesResp setQueryId(long queryId) {
this.queryId = queryId;
setQueryIdIsSet(true);
return this;
}
public void unsetQueryId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYID_ISSET_ID);
}
/** Returns true if field queryId is set (has been assigned a value) and false otherwise */
public boolean isSetQueryId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYID_ISSET_ID);
}
public void setQueryIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYID_ISSET_ID, value);
}
public int getColumnNameListSize() {
return (this.columnNameList == null) ? 0 : this.columnNameList.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator getColumnNameListIterator() {
return (this.columnNameList == null) ? null : this.columnNameList.iterator();
}
public void addToColumnNameList(java.lang.String elem) {
if (this.columnNameList == null) {
this.columnNameList = new java.util.ArrayList();
}
this.columnNameList.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List getColumnNameList() {
return this.columnNameList;
}
public TFetchTimeseriesResp setColumnNameList(@org.apache.thrift.annotation.Nullable java.util.List columnNameList) {
this.columnNameList = columnNameList;
return this;
}
public void unsetColumnNameList() {
this.columnNameList = null;
}
/** Returns true if field columnNameList is set (has been assigned a value) and false otherwise */
public boolean isSetColumnNameList() {
return this.columnNameList != null;
}
public void setColumnNameListIsSet(boolean value) {
if (!value) {
this.columnNameList = null;
}
}
public int getColumnTypeListSize() {
return (this.columnTypeList == null) ? 0 : this.columnTypeList.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator getColumnTypeListIterator() {
return (this.columnTypeList == null) ? null : this.columnTypeList.iterator();
}
public void addToColumnTypeList(java.lang.String elem) {
if (this.columnTypeList == null) {
this.columnTypeList = new java.util.ArrayList();
}
this.columnTypeList.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List getColumnTypeList() {
return this.columnTypeList;
}
public TFetchTimeseriesResp setColumnTypeList(@org.apache.thrift.annotation.Nullable java.util.List columnTypeList) {
this.columnTypeList = columnTypeList;
return this;
}
public void unsetColumnTypeList() {
this.columnTypeList = null;
}
/** Returns true if field columnTypeList is set (has been assigned a value) and false otherwise */
public boolean isSetColumnTypeList() {
return this.columnTypeList != null;
}
public void setColumnTypeListIsSet(boolean value) {
if (!value) {
this.columnTypeList = null;
}
}
public int getColumnNameIndexMapSize() {
return (this.columnNameIndexMap == null) ? 0 : this.columnNameIndexMap.size();
}
public void putToColumnNameIndexMap(java.lang.String key, int val) {
if (this.columnNameIndexMap == null) {
this.columnNameIndexMap = new java.util.HashMap();
}
this.columnNameIndexMap.put(key, val);
}
@org.apache.thrift.annotation.Nullable
public java.util.Map getColumnNameIndexMap() {
return this.columnNameIndexMap;
}
public TFetchTimeseriesResp setColumnNameIndexMap(@org.apache.thrift.annotation.Nullable java.util.Map columnNameIndexMap) {
this.columnNameIndexMap = columnNameIndexMap;
return this;
}
public void unsetColumnNameIndexMap() {
this.columnNameIndexMap = null;
}
/** Returns true if field columnNameIndexMap is set (has been assigned a value) and false otherwise */
public boolean isSetColumnNameIndexMap() {
return this.columnNameIndexMap != null;
}
public void setColumnNameIndexMapIsSet(boolean value) {
if (!value) {
this.columnNameIndexMap = null;
}
}
public int getTsDatasetSize() {
return (this.tsDataset == null) ? 0 : this.tsDataset.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator getTsDatasetIterator() {
return (this.tsDataset == null) ? null : this.tsDataset.iterator();
}
public void addToTsDataset(java.nio.ByteBuffer elem) {
if (this.tsDataset == null) {
this.tsDataset = new java.util.ArrayList();
}
this.tsDataset.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List getTsDataset() {
return this.tsDataset;
}
public TFetchTimeseriesResp setTsDataset(@org.apache.thrift.annotation.Nullable java.util.List tsDataset) {
this.tsDataset = tsDataset;
return this;
}
public void unsetTsDataset() {
this.tsDataset = null;
}
/** Returns true if field tsDataset is set (has been assigned a value) and false otherwise */
public boolean isSetTsDataset() {
return this.tsDataset != null;
}
public void setTsDatasetIsSet(boolean value) {
if (!value) {
this.tsDataset = null;
}
}
public boolean isHasMoreData() {
return this.hasMoreData;
}
public TFetchTimeseriesResp setHasMoreData(boolean hasMoreData) {
this.hasMoreData = hasMoreData;
setHasMoreDataIsSet(true);
return this;
}
public void unsetHasMoreData() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __HASMOREDATA_ISSET_ID);
}
/** Returns true if field hasMoreData is set (has been assigned a value) and false otherwise */
public boolean isSetHasMoreData() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __HASMOREDATA_ISSET_ID);
}
public void setHasMoreDataIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __HASMOREDATA_ISSET_ID, value);
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case STATUS:
if (value == null) {
unsetStatus();
} else {
setStatus((org.apache.iotdb.common.rpc.thrift.TSStatus)value);
}
break;
case QUERY_ID:
if (value == null) {
unsetQueryId();
} else {
setQueryId((java.lang.Long)value);
}
break;
case COLUMN_NAME_LIST:
if (value == null) {
unsetColumnNameList();
} else {
setColumnNameList((java.util.List)value);
}
break;
case COLUMN_TYPE_LIST:
if (value == null) {
unsetColumnTypeList();
} else {
setColumnTypeList((java.util.List)value);
}
break;
case COLUMN_NAME_INDEX_MAP:
if (value == null) {
unsetColumnNameIndexMap();
} else {
setColumnNameIndexMap((java.util.Map)value);
}
break;
case TS_DATASET:
if (value == null) {
unsetTsDataset();
} else {
setTsDataset((java.util.List)value);
}
break;
case HAS_MORE_DATA:
if (value == null) {
unsetHasMoreData();
} else {
setHasMoreData((java.lang.Boolean)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case STATUS:
return getStatus();
case QUERY_ID:
return getQueryId();
case COLUMN_NAME_LIST:
return getColumnNameList();
case COLUMN_TYPE_LIST:
return getColumnTypeList();
case COLUMN_NAME_INDEX_MAP:
return getColumnNameIndexMap();
case TS_DATASET:
return getTsDataset();
case HAS_MORE_DATA:
return isHasMoreData();
}
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 STATUS:
return isSetStatus();
case QUERY_ID:
return isSetQueryId();
case COLUMN_NAME_LIST:
return isSetColumnNameList();
case COLUMN_TYPE_LIST:
return isSetColumnTypeList();
case COLUMN_NAME_INDEX_MAP:
return isSetColumnNameIndexMap();
case TS_DATASET:
return isSetTsDataset();
case HAS_MORE_DATA:
return isSetHasMoreData();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TFetchTimeseriesResp)
return this.equals((TFetchTimeseriesResp)that);
return false;
}
public boolean equals(TFetchTimeseriesResp that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_status = true && this.isSetStatus();
boolean that_present_status = true && that.isSetStatus();
if (this_present_status || that_present_status) {
if (!(this_present_status && that_present_status))
return false;
if (!this.status.equals(that.status))
return false;
}
boolean this_present_queryId = true && this.isSetQueryId();
boolean that_present_queryId = true && that.isSetQueryId();
if (this_present_queryId || that_present_queryId) {
if (!(this_present_queryId && that_present_queryId))
return false;
if (this.queryId != that.queryId)
return false;
}
boolean this_present_columnNameList = true && this.isSetColumnNameList();
boolean that_present_columnNameList = true && that.isSetColumnNameList();
if (this_present_columnNameList || that_present_columnNameList) {
if (!(this_present_columnNameList && that_present_columnNameList))
return false;
if (!this.columnNameList.equals(that.columnNameList))
return false;
}
boolean this_present_columnTypeList = true && this.isSetColumnTypeList();
boolean that_present_columnTypeList = true && that.isSetColumnTypeList();
if (this_present_columnTypeList || that_present_columnTypeList) {
if (!(this_present_columnTypeList && that_present_columnTypeList))
return false;
if (!this.columnTypeList.equals(that.columnTypeList))
return false;
}
boolean this_present_columnNameIndexMap = true && this.isSetColumnNameIndexMap();
boolean that_present_columnNameIndexMap = true && that.isSetColumnNameIndexMap();
if (this_present_columnNameIndexMap || that_present_columnNameIndexMap) {
if (!(this_present_columnNameIndexMap && that_present_columnNameIndexMap))
return false;
if (!this.columnNameIndexMap.equals(that.columnNameIndexMap))
return false;
}
boolean this_present_tsDataset = true && this.isSetTsDataset();
boolean that_present_tsDataset = true && that.isSetTsDataset();
if (this_present_tsDataset || that_present_tsDataset) {
if (!(this_present_tsDataset && that_present_tsDataset))
return false;
if (!this.tsDataset.equals(that.tsDataset))
return false;
}
boolean this_present_hasMoreData = true && this.isSetHasMoreData();
boolean that_present_hasMoreData = true && that.isSetHasMoreData();
if (this_present_hasMoreData || that_present_hasMoreData) {
if (!(this_present_hasMoreData && that_present_hasMoreData))
return false;
if (this.hasMoreData != that.hasMoreData)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287);
if (isSetStatus())
hashCode = hashCode * 8191 + status.hashCode();
hashCode = hashCode * 8191 + ((isSetQueryId()) ? 131071 : 524287);
if (isSetQueryId())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(queryId);
hashCode = hashCode * 8191 + ((isSetColumnNameList()) ? 131071 : 524287);
if (isSetColumnNameList())
hashCode = hashCode * 8191 + columnNameList.hashCode();
hashCode = hashCode * 8191 + ((isSetColumnTypeList()) ? 131071 : 524287);
if (isSetColumnTypeList())
hashCode = hashCode * 8191 + columnTypeList.hashCode();
hashCode = hashCode * 8191 + ((isSetColumnNameIndexMap()) ? 131071 : 524287);
if (isSetColumnNameIndexMap())
hashCode = hashCode * 8191 + columnNameIndexMap.hashCode();
hashCode = hashCode * 8191 + ((isSetTsDataset()) ? 131071 : 524287);
if (isSetTsDataset())
hashCode = hashCode * 8191 + tsDataset.hashCode();
hashCode = hashCode * 8191 + ((isSetHasMoreData()) ? 131071 : 524287);
if (isSetHasMoreData())
hashCode = hashCode * 8191 + ((hasMoreData) ? 131071 : 524287);
return hashCode;
}
@Override
public int compareTo(TFetchTimeseriesResp other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStatus()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetQueryId(), other.isSetQueryId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQueryId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryId, other.queryId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnNameList(), other.isSetColumnNameList());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnNameList()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnNameList, other.columnNameList);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnTypeList(), other.isSetColumnTypeList());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnTypeList()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnTypeList, other.columnTypeList);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnNameIndexMap(), other.isSetColumnNameIndexMap());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnNameIndexMap()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnNameIndexMap, other.columnNameIndexMap);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTsDataset(), other.isSetTsDataset());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTsDataset()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tsDataset, other.tsDataset);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetHasMoreData(), other.isSetHasMoreData());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHasMoreData()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasMoreData, other.hasMoreData);
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("TFetchTimeseriesResp(");
boolean first = true;
sb.append("status:");
if (this.status == null) {
sb.append("null");
} else {
sb.append(this.status);
}
first = false;
if (isSetQueryId()) {
if (!first) sb.append(", ");
sb.append("queryId:");
sb.append(this.queryId);
first = false;
}
if (isSetColumnNameList()) {
if (!first) sb.append(", ");
sb.append("columnNameList:");
if (this.columnNameList == null) {
sb.append("null");
} else {
sb.append(this.columnNameList);
}
first = false;
}
if (isSetColumnTypeList()) {
if (!first) sb.append(", ");
sb.append("columnTypeList:");
if (this.columnTypeList == null) {
sb.append("null");
} else {
sb.append(this.columnTypeList);
}
first = false;
}
if (isSetColumnNameIndexMap()) {
if (!first) sb.append(", ");
sb.append("columnNameIndexMap:");
if (this.columnNameIndexMap == null) {
sb.append("null");
} else {
sb.append(this.columnNameIndexMap);
}
first = false;
}
if (isSetTsDataset()) {
if (!first) sb.append(", ");
sb.append("tsDataset:");
if (this.tsDataset == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.tsDataset, sb);
}
first = false;
}
if (isSetHasMoreData()) {
if (!first) sb.append(", ");
sb.append("hasMoreData:");
sb.append(this.hasMoreData);
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (status == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (status != null) {
status.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class TFetchTimeseriesRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TFetchTimeseriesRespStandardScheme getScheme() {
return new TFetchTimeseriesRespStandardScheme();
}
}
private static class TFetchTimeseriesRespStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, TFetchTimeseriesResp 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: // STATUS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus();
struct.status.read(iprot);
struct.setStatusIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // QUERY_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.queryId = iprot.readI64();
struct.setQueryIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // COLUMN_NAME_LIST
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list518 = iprot.readListBegin();
struct.columnNameList = new java.util.ArrayList(_list518.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem519;
for (int _i520 = 0; _i520 < _list518.size; ++_i520)
{
_elem519 = iprot.readString();
struct.columnNameList.add(_elem519);
}
iprot.readListEnd();
}
struct.setColumnNameListIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // COLUMN_TYPE_LIST
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list521 = iprot.readListBegin();
struct.columnTypeList = new java.util.ArrayList(_list521.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem522;
for (int _i523 = 0; _i523 < _list521.size; ++_i523)
{
_elem522 = iprot.readString();
struct.columnTypeList.add(_elem522);
}
iprot.readListEnd();
}
struct.setColumnTypeListIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // COLUMN_NAME_INDEX_MAP
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map524 = iprot.readMapBegin();
struct.columnNameIndexMap = new java.util.HashMap(2*_map524.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key525;
int _val526;
for (int _i527 = 0; _i527 < _map524.size; ++_i527)
{
_key525 = iprot.readString();
_val526 = iprot.readI32();
struct.columnNameIndexMap.put(_key525, _val526);
}
iprot.readMapEnd();
}
struct.setColumnNameIndexMapIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // TS_DATASET
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list528 = iprot.readListBegin();
struct.tsDataset = new java.util.ArrayList(_list528.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem529;
for (int _i530 = 0; _i530 < _list528.size; ++_i530)
{
_elem529 = iprot.readBinary();
struct.tsDataset.add(_elem529);
}
iprot.readListEnd();
}
struct.setTsDatasetIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // HAS_MORE_DATA
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.hasMoreData = iprot.readBool();
struct.setHasMoreDataIsSet(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, TFetchTimeseriesResp struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.status != null) {
oprot.writeFieldBegin(STATUS_FIELD_DESC);
struct.status.write(oprot);
oprot.writeFieldEnd();
}
if (struct.isSetQueryId()) {
oprot.writeFieldBegin(QUERY_ID_FIELD_DESC);
oprot.writeI64(struct.queryId);
oprot.writeFieldEnd();
}
if (struct.columnNameList != null) {
if (struct.isSetColumnNameList()) {
oprot.writeFieldBegin(COLUMN_NAME_LIST_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columnNameList.size()));
for (java.lang.String _iter531 : struct.columnNameList)
{
oprot.writeString(_iter531);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.columnTypeList != null) {
if (struct.isSetColumnTypeList()) {
oprot.writeFieldBegin(COLUMN_TYPE_LIST_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columnTypeList.size()));
for (java.lang.String _iter532 : struct.columnTypeList)
{
oprot.writeString(_iter532);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.columnNameIndexMap != null) {
if (struct.isSetColumnNameIndexMap()) {
oprot.writeFieldBegin(COLUMN_NAME_INDEX_MAP_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, struct.columnNameIndexMap.size()));
for (java.util.Map.Entry _iter533 : struct.columnNameIndexMap.entrySet())
{
oprot.writeString(_iter533.getKey());
oprot.writeI32(_iter533.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.tsDataset != null) {
if (struct.isSetTsDataset()) {
oprot.writeFieldBegin(TS_DATASET_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tsDataset.size()));
for (java.nio.ByteBuffer _iter534 : struct.tsDataset)
{
oprot.writeBinary(_iter534);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.isSetHasMoreData()) {
oprot.writeFieldBegin(HAS_MORE_DATA_FIELD_DESC);
oprot.writeBool(struct.hasMoreData);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TFetchTimeseriesRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TFetchTimeseriesRespTupleScheme getScheme() {
return new TFetchTimeseriesRespTupleScheme();
}
}
private static class TFetchTimeseriesRespTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TFetchTimeseriesResp struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.status.write(oprot);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetQueryId()) {
optionals.set(0);
}
if (struct.isSetColumnNameList()) {
optionals.set(1);
}
if (struct.isSetColumnTypeList()) {
optionals.set(2);
}
if (struct.isSetColumnNameIndexMap()) {
optionals.set(3);
}
if (struct.isSetTsDataset()) {
optionals.set(4);
}
if (struct.isSetHasMoreData()) {
optionals.set(5);
}
oprot.writeBitSet(optionals, 6);
if (struct.isSetQueryId()) {
oprot.writeI64(struct.queryId);
}
if (struct.isSetColumnNameList()) {
{
oprot.writeI32(struct.columnNameList.size());
for (java.lang.String _iter535 : struct.columnNameList)
{
oprot.writeString(_iter535);
}
}
}
if (struct.isSetColumnTypeList()) {
{
oprot.writeI32(struct.columnTypeList.size());
for (java.lang.String _iter536 : struct.columnTypeList)
{
oprot.writeString(_iter536);
}
}
}
if (struct.isSetColumnNameIndexMap()) {
{
oprot.writeI32(struct.columnNameIndexMap.size());
for (java.util.Map.Entry _iter537 : struct.columnNameIndexMap.entrySet())
{
oprot.writeString(_iter537.getKey());
oprot.writeI32(_iter537.getValue());
}
}
}
if (struct.isSetTsDataset()) {
{
oprot.writeI32(struct.tsDataset.size());
for (java.nio.ByteBuffer _iter538 : struct.tsDataset)
{
oprot.writeBinary(_iter538);
}
}
}
if (struct.isSetHasMoreData()) {
oprot.writeBool(struct.hasMoreData);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TFetchTimeseriesResp struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus();
struct.status.read(iprot);
struct.setStatusIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(6);
if (incoming.get(0)) {
struct.queryId = iprot.readI64();
struct.setQueryIdIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list539 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.columnNameList = new java.util.ArrayList(_list539.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem540;
for (int _i541 = 0; _i541 < _list539.size; ++_i541)
{
_elem540 = iprot.readString();
struct.columnNameList.add(_elem540);
}
}
struct.setColumnNameListIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list542 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.columnTypeList = new java.util.ArrayList(_list542.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem543;
for (int _i544 = 0; _i544 < _list542.size; ++_i544)
{
_elem543 = iprot.readString();
struct.columnTypeList.add(_elem543);
}
}
struct.setColumnTypeListIsSet(true);
}
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TMap _map545 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32);
struct.columnNameIndexMap = new java.util.HashMap(2*_map545.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key546;
int _val547;
for (int _i548 = 0; _i548 < _map545.size; ++_i548)
{
_key546 = iprot.readString();
_val547 = iprot.readI32();
struct.columnNameIndexMap.put(_key546, _val547);
}
}
struct.setColumnNameIndexMapIsSet(true);
}
if (incoming.get(4)) {
{
org.apache.thrift.protocol.TList _list549 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.tsDataset = new java.util.ArrayList(_list549.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem550;
for (int _i551 = 0; _i551 < _list549.size; ++_i551)
{
_elem550 = iprot.readBinary();
struct.tsDataset.add(_elem550);
}
}
struct.setTsDatasetIsSet(true);
}
if (incoming.get(5)) {
struct.hasMoreData = iprot.readBool();
struct.setHasMoreDataIsSet(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();
}
}