TPaloScanRange.java
/**
* Autogenerated by Thrift Compiler (0.16.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.doris.thrift;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)", date = "2026-05-14")
public class TPaloScanRange implements org.apache.thrift.TBase<TPaloScanRange, TPaloScanRange._Fields>, java.io.Serializable, Cloneable, Comparable<TPaloScanRange> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPaloScanRange");
private static final org.apache.thrift.protocol.TField HOSTS_FIELD_DESC = new org.apache.thrift.protocol.TField("hosts", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField SCHEMA_HASH_FIELD_DESC = new org.apache.thrift.protocol.TField("schema_hash", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField VERSION_HASH_FIELD_DESC = new org.apache.thrift.protocol.TField("version_hash", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField TABLET_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tablet_id", org.apache.thrift.protocol.TType.I64, (short)5);
private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.protocol.TField PARTITION_COLUMN_RANGES_FIELD_DESC = new org.apache.thrift.protocol.TField("partition_column_ranges", org.apache.thrift.protocol.TType.LIST, (short)7);
private static final org.apache.thrift.protocol.TField INDEX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("index_name", org.apache.thrift.protocol.TType.STRING, (short)8);
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)9);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TPaloScanRangeStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TPaloScanRangeTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TNetworkAddress> hosts; // required
public @org.apache.thrift.annotation.Nullable java.lang.String schema_hash; // required
public @org.apache.thrift.annotation.Nullable java.lang.String version; // required
public @org.apache.thrift.annotation.Nullable java.lang.String version_hash; // required
public long tablet_id; // required
public @org.apache.thrift.annotation.Nullable java.lang.String db_name; // required
public @org.apache.thrift.annotation.Nullable java.util.List<TKeyRange> partition_column_ranges; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String index_name; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String table_name; // 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 {
HOSTS((short)1, "hosts"),
SCHEMA_HASH((short)2, "schema_hash"),
VERSION((short)3, "version"),
VERSION_HASH((short)4, "version_hash"),
TABLET_ID((short)5, "tablet_id"),
DB_NAME((short)6, "db_name"),
PARTITION_COLUMN_RANGES((short)7, "partition_column_ranges"),
INDEX_NAME((short)8, "index_name"),
TABLE_NAME((short)9, "table_name");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // HOSTS
return HOSTS;
case 2: // SCHEMA_HASH
return SCHEMA_HASH;
case 3: // VERSION
return VERSION;
case 4: // VERSION_HASH
return VERSION_HASH;
case 5: // TABLET_ID
return TABLET_ID;
case 6: // DB_NAME
return DB_NAME;
case 7: // PARTITION_COLUMN_RANGES
return PARTITION_COLUMN_RANGES;
case 8: // INDEX_NAME
return INDEX_NAME;
case 9: // TABLE_NAME
return TABLE_NAME;
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 __TABLET_ID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.PARTITION_COLUMN_RANGES,_Fields.INDEX_NAME,_Fields.TABLE_NAME};
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.HOSTS, new org.apache.thrift.meta_data.FieldMetaData("hosts", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TNetworkAddress.class))));
tmpMap.put(_Fields.SCHEMA_HASH, new org.apache.thrift.meta_data.FieldMetaData("schema_hash", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.VERSION_HASH, new org.apache.thrift.meta_data.FieldMetaData("version_hash", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TABLET_ID, new org.apache.thrift.meta_data.FieldMetaData("tablet_id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "TTabletId")));
tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PARTITION_COLUMN_RANGES, new org.apache.thrift.meta_data.FieldMetaData("partition_column_ranges", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TKeyRange.class))));
tmpMap.put(_Fields.INDEX_NAME, new org.apache.thrift.meta_data.FieldMetaData("index_name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPaloScanRange.class, metaDataMap);
}
public TPaloScanRange() {
}
public TPaloScanRange(
java.util.List<org.apache.doris.thrift.TNetworkAddress> hosts,
java.lang.String schema_hash,
java.lang.String version,
java.lang.String version_hash,
long tablet_id,
java.lang.String db_name)
{
this();
this.hosts = hosts;
this.schema_hash = schema_hash;
this.version = version;
this.version_hash = version_hash;
this.tablet_id = tablet_id;
setTabletIdIsSet(true);
this.db_name = db_name;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TPaloScanRange(TPaloScanRange other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetHosts()) {
java.util.List<org.apache.doris.thrift.TNetworkAddress> __this__hosts = new java.util.ArrayList<org.apache.doris.thrift.TNetworkAddress>(other.hosts.size());
for (org.apache.doris.thrift.TNetworkAddress other_element : other.hosts) {
__this__hosts.add(new org.apache.doris.thrift.TNetworkAddress(other_element));
}
this.hosts = __this__hosts;
}
if (other.isSetSchemaHash()) {
this.schema_hash = other.schema_hash;
}
if (other.isSetVersion()) {
this.version = other.version;
}
if (other.isSetVersionHash()) {
this.version_hash = other.version_hash;
}
this.tablet_id = other.tablet_id;
if (other.isSetDbName()) {
this.db_name = other.db_name;
}
if (other.isSetPartitionColumnRanges()) {
java.util.List<TKeyRange> __this__partition_column_ranges = new java.util.ArrayList<TKeyRange>(other.partition_column_ranges.size());
for (TKeyRange other_element : other.partition_column_ranges) {
__this__partition_column_ranges.add(new TKeyRange(other_element));
}
this.partition_column_ranges = __this__partition_column_ranges;
}
if (other.isSetIndexName()) {
this.index_name = other.index_name;
}
if (other.isSetTableName()) {
this.table_name = other.table_name;
}
}
public TPaloScanRange deepCopy() {
return new TPaloScanRange(this);
}
@Override
public void clear() {
this.hosts = null;
this.schema_hash = null;
this.version = null;
this.version_hash = null;
setTabletIdIsSet(false);
this.tablet_id = 0;
this.db_name = null;
this.partition_column_ranges = null;
this.index_name = null;
this.table_name = null;
}
public int getHostsSize() {
return (this.hosts == null) ? 0 : this.hosts.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<org.apache.doris.thrift.TNetworkAddress> getHostsIterator() {
return (this.hosts == null) ? null : this.hosts.iterator();
}
public void addToHosts(org.apache.doris.thrift.TNetworkAddress elem) {
if (this.hosts == null) {
this.hosts = new java.util.ArrayList<org.apache.doris.thrift.TNetworkAddress>();
}
this.hosts.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<org.apache.doris.thrift.TNetworkAddress> getHosts() {
return this.hosts;
}
public TPaloScanRange setHosts(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TNetworkAddress> hosts) {
this.hosts = hosts;
return this;
}
public void unsetHosts() {
this.hosts = null;
}
/** Returns true if field hosts is set (has been assigned a value) and false otherwise */
public boolean isSetHosts() {
return this.hosts != null;
}
public void setHostsIsSet(boolean value) {
if (!value) {
this.hosts = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getSchemaHash() {
return this.schema_hash;
}
public TPaloScanRange setSchemaHash(@org.apache.thrift.annotation.Nullable java.lang.String schema_hash) {
this.schema_hash = schema_hash;
return this;
}
public void unsetSchemaHash() {
this.schema_hash = null;
}
/** Returns true if field schema_hash is set (has been assigned a value) and false otherwise */
public boolean isSetSchemaHash() {
return this.schema_hash != null;
}
public void setSchemaHashIsSet(boolean value) {
if (!value) {
this.schema_hash = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getVersion() {
return this.version;
}
public TPaloScanRange setVersion(@org.apache.thrift.annotation.Nullable java.lang.String version) {
this.version = version;
return this;
}
public void unsetVersion() {
this.version = null;
}
/** Returns true if field version is set (has been assigned a value) and false otherwise */
public boolean isSetVersion() {
return this.version != null;
}
public void setVersionIsSet(boolean value) {
if (!value) {
this.version = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getVersionHash() {
return this.version_hash;
}
public TPaloScanRange setVersionHash(@org.apache.thrift.annotation.Nullable java.lang.String version_hash) {
this.version_hash = version_hash;
return this;
}
public void unsetVersionHash() {
this.version_hash = null;
}
/** Returns true if field version_hash is set (has been assigned a value) and false otherwise */
public boolean isSetVersionHash() {
return this.version_hash != null;
}
public void setVersionHashIsSet(boolean value) {
if (!value) {
this.version_hash = null;
}
}
public long getTabletId() {
return this.tablet_id;
}
public TPaloScanRange setTabletId(long tablet_id) {
this.tablet_id = tablet_id;
setTabletIdIsSet(true);
return this;
}
public void unsetTabletId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TABLET_ID_ISSET_ID);
}
/** Returns true if field tablet_id is set (has been assigned a value) and false otherwise */
public boolean isSetTabletId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TABLET_ID_ISSET_ID);
}
public void setTabletIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TABLET_ID_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDbName() {
return this.db_name;
}
public TPaloScanRange setDbName(@org.apache.thrift.annotation.Nullable java.lang.String db_name) {
this.db_name = db_name;
return this;
}
public void unsetDbName() {
this.db_name = null;
}
/** Returns true if field db_name is set (has been assigned a value) and false otherwise */
public boolean isSetDbName() {
return this.db_name != null;
}
public void setDbNameIsSet(boolean value) {
if (!value) {
this.db_name = null;
}
}
public int getPartitionColumnRangesSize() {
return (this.partition_column_ranges == null) ? 0 : this.partition_column_ranges.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TKeyRange> getPartitionColumnRangesIterator() {
return (this.partition_column_ranges == null) ? null : this.partition_column_ranges.iterator();
}
public void addToPartitionColumnRanges(TKeyRange elem) {
if (this.partition_column_ranges == null) {
this.partition_column_ranges = new java.util.ArrayList<TKeyRange>();
}
this.partition_column_ranges.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<TKeyRange> getPartitionColumnRanges() {
return this.partition_column_ranges;
}
public TPaloScanRange setPartitionColumnRanges(@org.apache.thrift.annotation.Nullable java.util.List<TKeyRange> partition_column_ranges) {
this.partition_column_ranges = partition_column_ranges;
return this;
}
public void unsetPartitionColumnRanges() {
this.partition_column_ranges = null;
}
/** Returns true if field partition_column_ranges is set (has been assigned a value) and false otherwise */
public boolean isSetPartitionColumnRanges() {
return this.partition_column_ranges != null;
}
public void setPartitionColumnRangesIsSet(boolean value) {
if (!value) {
this.partition_column_ranges = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getIndexName() {
return this.index_name;
}
public TPaloScanRange setIndexName(@org.apache.thrift.annotation.Nullable java.lang.String index_name) {
this.index_name = index_name;
return this;
}
public void unsetIndexName() {
this.index_name = null;
}
/** Returns true if field index_name is set (has been assigned a value) and false otherwise */
public boolean isSetIndexName() {
return this.index_name != null;
}
public void setIndexNameIsSet(boolean value) {
if (!value) {
this.index_name = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getTableName() {
return this.table_name;
}
public TPaloScanRange setTableName(@org.apache.thrift.annotation.Nullable java.lang.String table_name) {
this.table_name = table_name;
return this;
}
public void unsetTableName() {
this.table_name = null;
}
/** Returns true if field table_name is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.table_name != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.table_name = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case HOSTS:
if (value == null) {
unsetHosts();
} else {
setHosts((java.util.List<org.apache.doris.thrift.TNetworkAddress>)value);
}
break;
case SCHEMA_HASH:
if (value == null) {
unsetSchemaHash();
} else {
setSchemaHash((java.lang.String)value);
}
break;
case VERSION:
if (value == null) {
unsetVersion();
} else {
setVersion((java.lang.String)value);
}
break;
case VERSION_HASH:
if (value == null) {
unsetVersionHash();
} else {
setVersionHash((java.lang.String)value);
}
break;
case TABLET_ID:
if (value == null) {
unsetTabletId();
} else {
setTabletId((java.lang.Long)value);
}
break;
case DB_NAME:
if (value == null) {
unsetDbName();
} else {
setDbName((java.lang.String)value);
}
break;
case PARTITION_COLUMN_RANGES:
if (value == null) {
unsetPartitionColumnRanges();
} else {
setPartitionColumnRanges((java.util.List<TKeyRange>)value);
}
break;
case INDEX_NAME:
if (value == null) {
unsetIndexName();
} else {
setIndexName((java.lang.String)value);
}
break;
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((java.lang.String)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case HOSTS:
return getHosts();
case SCHEMA_HASH:
return getSchemaHash();
case VERSION:
return getVersion();
case VERSION_HASH:
return getVersionHash();
case TABLET_ID:
return getTabletId();
case DB_NAME:
return getDbName();
case PARTITION_COLUMN_RANGES:
return getPartitionColumnRanges();
case INDEX_NAME:
return getIndexName();
case TABLE_NAME:
return getTableName();
}
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 HOSTS:
return isSetHosts();
case SCHEMA_HASH:
return isSetSchemaHash();
case VERSION:
return isSetVersion();
case VERSION_HASH:
return isSetVersionHash();
case TABLET_ID:
return isSetTabletId();
case DB_NAME:
return isSetDbName();
case PARTITION_COLUMN_RANGES:
return isSetPartitionColumnRanges();
case INDEX_NAME:
return isSetIndexName();
case TABLE_NAME:
return isSetTableName();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TPaloScanRange)
return this.equals((TPaloScanRange)that);
return false;
}
public boolean equals(TPaloScanRange that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_hosts = true && this.isSetHosts();
boolean that_present_hosts = true && that.isSetHosts();
if (this_present_hosts || that_present_hosts) {
if (!(this_present_hosts && that_present_hosts))
return false;
if (!this.hosts.equals(that.hosts))
return false;
}
boolean this_present_schema_hash = true && this.isSetSchemaHash();
boolean that_present_schema_hash = true && that.isSetSchemaHash();
if (this_present_schema_hash || that_present_schema_hash) {
if (!(this_present_schema_hash && that_present_schema_hash))
return false;
if (!this.schema_hash.equals(that.schema_hash))
return false;
}
boolean this_present_version = true && this.isSetVersion();
boolean that_present_version = true && that.isSetVersion();
if (this_present_version || that_present_version) {
if (!(this_present_version && that_present_version))
return false;
if (!this.version.equals(that.version))
return false;
}
boolean this_present_version_hash = true && this.isSetVersionHash();
boolean that_present_version_hash = true && that.isSetVersionHash();
if (this_present_version_hash || that_present_version_hash) {
if (!(this_present_version_hash && that_present_version_hash))
return false;
if (!this.version_hash.equals(that.version_hash))
return false;
}
boolean this_present_tablet_id = true;
boolean that_present_tablet_id = true;
if (this_present_tablet_id || that_present_tablet_id) {
if (!(this_present_tablet_id && that_present_tablet_id))
return false;
if (this.tablet_id != that.tablet_id)
return false;
}
boolean this_present_db_name = true && this.isSetDbName();
boolean that_present_db_name = true && that.isSetDbName();
if (this_present_db_name || that_present_db_name) {
if (!(this_present_db_name && that_present_db_name))
return false;
if (!this.db_name.equals(that.db_name))
return false;
}
boolean this_present_partition_column_ranges = true && this.isSetPartitionColumnRanges();
boolean that_present_partition_column_ranges = true && that.isSetPartitionColumnRanges();
if (this_present_partition_column_ranges || that_present_partition_column_ranges) {
if (!(this_present_partition_column_ranges && that_present_partition_column_ranges))
return false;
if (!this.partition_column_ranges.equals(that.partition_column_ranges))
return false;
}
boolean this_present_index_name = true && this.isSetIndexName();
boolean that_present_index_name = true && that.isSetIndexName();
if (this_present_index_name || that_present_index_name) {
if (!(this_present_index_name && that_present_index_name))
return false;
if (!this.index_name.equals(that.index_name))
return false;
}
boolean this_present_table_name = true && this.isSetTableName();
boolean that_present_table_name = true && that.isSetTableName();
if (this_present_table_name || that_present_table_name) {
if (!(this_present_table_name && that_present_table_name))
return false;
if (!this.table_name.equals(that.table_name))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetHosts()) ? 131071 : 524287);
if (isSetHosts())
hashCode = hashCode * 8191 + hosts.hashCode();
hashCode = hashCode * 8191 + ((isSetSchemaHash()) ? 131071 : 524287);
if (isSetSchemaHash())
hashCode = hashCode * 8191 + schema_hash.hashCode();
hashCode = hashCode * 8191 + ((isSetVersion()) ? 131071 : 524287);
if (isSetVersion())
hashCode = hashCode * 8191 + version.hashCode();
hashCode = hashCode * 8191 + ((isSetVersionHash()) ? 131071 : 524287);
if (isSetVersionHash())
hashCode = hashCode * 8191 + version_hash.hashCode();
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(tablet_id);
hashCode = hashCode * 8191 + ((isSetDbName()) ? 131071 : 524287);
if (isSetDbName())
hashCode = hashCode * 8191 + db_name.hashCode();
hashCode = hashCode * 8191 + ((isSetPartitionColumnRanges()) ? 131071 : 524287);
if (isSetPartitionColumnRanges())
hashCode = hashCode * 8191 + partition_column_ranges.hashCode();
hashCode = hashCode * 8191 + ((isSetIndexName()) ? 131071 : 524287);
if (isSetIndexName())
hashCode = hashCode * 8191 + index_name.hashCode();
hashCode = hashCode * 8191 + ((isSetTableName()) ? 131071 : 524287);
if (isSetTableName())
hashCode = hashCode * 8191 + table_name.hashCode();
return hashCode;
}
@Override
public int compareTo(TPaloScanRange other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetHosts(), other.isSetHosts());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHosts()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hosts, other.hosts);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSchemaHash(), other.isSetSchemaHash());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSchemaHash()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schema_hash, other.schema_hash);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetVersion(), other.isSetVersion());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetVersion()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetVersionHash(), other.isSetVersionHash());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetVersionHash()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version_hash, other.version_hash);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTabletId(), other.isSetTabletId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTabletId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablet_id, other.tablet_id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDbName(), other.isSetDbName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDbName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPartitionColumnRanges(), other.isSetPartitionColumnRanges());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPartitionColumnRanges()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partition_column_ranges, other.partition_column_ranges);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetIndexName(), other.isSetIndexName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIndexName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_name, other.index_name);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTableName(), other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name);
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("TPaloScanRange(");
boolean first = true;
sb.append("hosts:");
if (this.hosts == null) {
sb.append("null");
} else {
sb.append(this.hosts);
}
first = false;
if (!first) sb.append(", ");
sb.append("schema_hash:");
if (this.schema_hash == null) {
sb.append("null");
} else {
sb.append(this.schema_hash);
}
first = false;
if (!first) sb.append(", ");
sb.append("version:");
if (this.version == null) {
sb.append("null");
} else {
sb.append(this.version);
}
first = false;
if (!first) sb.append(", ");
sb.append("version_hash:");
if (this.version_hash == null) {
sb.append("null");
} else {
sb.append(this.version_hash);
}
first = false;
if (!first) sb.append(", ");
sb.append("tablet_id:");
sb.append(this.tablet_id);
first = false;
if (!first) sb.append(", ");
sb.append("db_name:");
if (this.db_name == null) {
sb.append("null");
} else {
sb.append(this.db_name);
}
first = false;
if (isSetPartitionColumnRanges()) {
if (!first) sb.append(", ");
sb.append("partition_column_ranges:");
if (this.partition_column_ranges == null) {
sb.append("null");
} else {
sb.append(this.partition_column_ranges);
}
first = false;
}
if (isSetIndexName()) {
if (!first) sb.append(", ");
sb.append("index_name:");
if (this.index_name == null) {
sb.append("null");
} else {
sb.append(this.index_name);
}
first = false;
}
if (isSetTableName()) {
if (!first) sb.append(", ");
sb.append("table_name:");
if (this.table_name == null) {
sb.append("null");
} else {
sb.append(this.table_name);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (hosts == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'hosts' was not present! Struct: " + toString());
}
if (schema_hash == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'schema_hash' was not present! Struct: " + toString());
}
if (version == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'version' was not present! Struct: " + toString());
}
if (version_hash == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'version_hash' was not present! Struct: " + toString());
}
// alas, we cannot check 'tablet_id' because it's a primitive and you chose the non-beans generator.
if (db_name == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'db_name' 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 TPaloScanRangeStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TPaloScanRangeStandardScheme getScheme() {
return new TPaloScanRangeStandardScheme();
}
}
private static class TPaloScanRangeStandardScheme extends org.apache.thrift.scheme.StandardScheme<TPaloScanRange> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TPaloScanRange 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: // HOSTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
struct.hosts = new java.util.ArrayList<org.apache.doris.thrift.TNetworkAddress>(_list0.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TNetworkAddress _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = new org.apache.doris.thrift.TNetworkAddress();
_elem1.read(iprot);
struct.hosts.add(_elem1);
}
iprot.readListEnd();
}
struct.setHostsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // SCHEMA_HASH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.schema_hash = iprot.readString();
struct.setSchemaHashIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // VERSION
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.version = iprot.readString();
struct.setVersionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // VERSION_HASH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.version_hash = iprot.readString();
struct.setVersionHashIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // TABLET_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.tablet_id = iprot.readI64();
struct.setTabletIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // DB_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.db_name = iprot.readString();
struct.setDbNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // PARTITION_COLUMN_RANGES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
struct.partition_column_ranges = new java.util.ArrayList<TKeyRange>(_list3.size);
@org.apache.thrift.annotation.Nullable TKeyRange _elem4;
for (int _i5 = 0; _i5 < _list3.size; ++_i5)
{
_elem4 = new TKeyRange();
_elem4.read(iprot);
struct.partition_column_ranges.add(_elem4);
}
iprot.readListEnd();
}
struct.setPartitionColumnRangesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // INDEX_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.index_name = iprot.readString();
struct.setIndexNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // TABLE_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table_name = iprot.readString();
struct.setTableNameIsSet(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.isSetTabletId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablet_id' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TPaloScanRange struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.hosts != null) {
oprot.writeFieldBegin(HOSTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.hosts.size()));
for (org.apache.doris.thrift.TNetworkAddress _iter6 : struct.hosts)
{
_iter6.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.schema_hash != null) {
oprot.writeFieldBegin(SCHEMA_HASH_FIELD_DESC);
oprot.writeString(struct.schema_hash);
oprot.writeFieldEnd();
}
if (struct.version != null) {
oprot.writeFieldBegin(VERSION_FIELD_DESC);
oprot.writeString(struct.version);
oprot.writeFieldEnd();
}
if (struct.version_hash != null) {
oprot.writeFieldBegin(VERSION_HASH_FIELD_DESC);
oprot.writeString(struct.version_hash);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(TABLET_ID_FIELD_DESC);
oprot.writeI64(struct.tablet_id);
oprot.writeFieldEnd();
if (struct.db_name != null) {
oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
oprot.writeString(struct.db_name);
oprot.writeFieldEnd();
}
if (struct.partition_column_ranges != null) {
if (struct.isSetPartitionColumnRanges()) {
oprot.writeFieldBegin(PARTITION_COLUMN_RANGES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partition_column_ranges.size()));
for (TKeyRange _iter7 : struct.partition_column_ranges)
{
_iter7.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.index_name != null) {
if (struct.isSetIndexName()) {
oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC);
oprot.writeString(struct.index_name);
oprot.writeFieldEnd();
}
}
if (struct.table_name != null) {
if (struct.isSetTableName()) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.table_name);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TPaloScanRangeTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TPaloScanRangeTupleScheme getScheme() {
return new TPaloScanRangeTupleScheme();
}
}
private static class TPaloScanRangeTupleScheme extends org.apache.thrift.scheme.TupleScheme<TPaloScanRange> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TPaloScanRange struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
oprot.writeI32(struct.hosts.size());
for (org.apache.doris.thrift.TNetworkAddress _iter8 : struct.hosts)
{
_iter8.write(oprot);
}
}
oprot.writeString(struct.schema_hash);
oprot.writeString(struct.version);
oprot.writeString(struct.version_hash);
oprot.writeI64(struct.tablet_id);
oprot.writeString(struct.db_name);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetPartitionColumnRanges()) {
optionals.set(0);
}
if (struct.isSetIndexName()) {
optionals.set(1);
}
if (struct.isSetTableName()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetPartitionColumnRanges()) {
{
oprot.writeI32(struct.partition_column_ranges.size());
for (TKeyRange _iter9 : struct.partition_column_ranges)
{
_iter9.write(oprot);
}
}
}
if (struct.isSetIndexName()) {
oprot.writeString(struct.index_name);
}
if (struct.isSetTableName()) {
oprot.writeString(struct.table_name);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TPaloScanRange struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
org.apache.thrift.protocol.TList _list10 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.hosts = new java.util.ArrayList<org.apache.doris.thrift.TNetworkAddress>(_list10.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TNetworkAddress _elem11;
for (int _i12 = 0; _i12 < _list10.size; ++_i12)
{
_elem11 = new org.apache.doris.thrift.TNetworkAddress();
_elem11.read(iprot);
struct.hosts.add(_elem11);
}
}
struct.setHostsIsSet(true);
struct.schema_hash = iprot.readString();
struct.setSchemaHashIsSet(true);
struct.version = iprot.readString();
struct.setVersionIsSet(true);
struct.version_hash = iprot.readString();
struct.setVersionHashIsSet(true);
struct.tablet_id = iprot.readI64();
struct.setTabletIdIsSet(true);
struct.db_name = iprot.readString();
struct.setDbNameIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list13 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.partition_column_ranges = new java.util.ArrayList<TKeyRange>(_list13.size);
@org.apache.thrift.annotation.Nullable TKeyRange _elem14;
for (int _i15 = 0; _i15 < _list13.size; ++_i15)
{
_elem14 = new TKeyRange();
_elem14.read(iprot);
struct.partition_column_ranges.add(_elem14);
}
}
struct.setPartitionColumnRangesIsSet(true);
}
if (incoming.get(1)) {
struct.index_name = iprot.readString();
struct.setIndexNameIsSet(true);
}
if (incoming.get(2)) {
struct.table_name = iprot.readString();
struct.setTableNameIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}