TAlterInvertedIndexReq.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 TAlterInvertedIndexReq implements org.apache.thrift.TBase<TAlterInvertedIndexReq, TAlterInvertedIndexReq._Fields>, java.io.Serializable, Cloneable, Comparable<TAlterInvertedIndexReq> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAlterInvertedIndexReq");
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)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.I32, (short)2);
private static final org.apache.thrift.protocol.TField ALTER_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("alter_version", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.protocol.TField ALTER_TABLET_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("alter_tablet_type", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField IS_DROP_OP_FIELD_DESC = new org.apache.thrift.protocol.TField("is_drop_op", org.apache.thrift.protocol.TType.BOOL, (short)5);
private static final org.apache.thrift.protocol.TField ALTER_INVERTED_INDEXES_FIELD_DESC = new org.apache.thrift.protocol.TField("alter_inverted_indexes", org.apache.thrift.protocol.TType.LIST, (short)6);
private static final org.apache.thrift.protocol.TField INDEXES_DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("indexes_desc", org.apache.thrift.protocol.TType.LIST, (short)7);
private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)8);
private static final org.apache.thrift.protocol.TField JOB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("job_id", org.apache.thrift.protocol.TType.I64, (short)9);
private static final org.apache.thrift.protocol.TField EXPIRATION_FIELD_DESC = new org.apache.thrift.protocol.TField("expiration", org.apache.thrift.protocol.TType.I64, (short)10);
private static final org.apache.thrift.protocol.TField SCHEMA_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("schema_version", org.apache.thrift.protocol.TType.I32, (short)11);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TAlterInvertedIndexReqStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TAlterInvertedIndexReqTupleSchemeFactory();
public long tablet_id; // required
public int schema_hash; // required
public long alter_version; // optional
/**
*
* @see TAlterTabletType
*/
public @org.apache.thrift.annotation.Nullable TAlterTabletType alter_tablet_type; // optional
public boolean is_drop_op; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TOlapTableIndex> alter_inverted_indexes; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TOlapTableIndex> indexes_desc; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TColumn> columns; // optional
public long job_id; // optional
public long expiration; // optional
public int schema_version; // 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 {
TABLET_ID((short)1, "tablet_id"),
SCHEMA_HASH((short)2, "schema_hash"),
ALTER_VERSION((short)3, "alter_version"),
/**
*
* @see TAlterTabletType
*/
ALTER_TABLET_TYPE((short)4, "alter_tablet_type"),
IS_DROP_OP((short)5, "is_drop_op"),
ALTER_INVERTED_INDEXES((short)6, "alter_inverted_indexes"),
INDEXES_DESC((short)7, "indexes_desc"),
COLUMNS((short)8, "columns"),
JOB_ID((short)9, "job_id"),
EXPIRATION((short)10, "expiration"),
SCHEMA_VERSION((short)11, "schema_version");
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: // TABLET_ID
return TABLET_ID;
case 2: // SCHEMA_HASH
return SCHEMA_HASH;
case 3: // ALTER_VERSION
return ALTER_VERSION;
case 4: // ALTER_TABLET_TYPE
return ALTER_TABLET_TYPE;
case 5: // IS_DROP_OP
return IS_DROP_OP;
case 6: // ALTER_INVERTED_INDEXES
return ALTER_INVERTED_INDEXES;
case 7: // INDEXES_DESC
return INDEXES_DESC;
case 8: // COLUMNS
return COLUMNS;
case 9: // JOB_ID
return JOB_ID;
case 10: // EXPIRATION
return EXPIRATION;
case 11: // SCHEMA_VERSION
return SCHEMA_VERSION;
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 static final int __SCHEMA_HASH_ISSET_ID = 1;
private static final int __ALTER_VERSION_ISSET_ID = 2;
private static final int __IS_DROP_OP_ISSET_ID = 3;
private static final int __JOB_ID_ISSET_ID = 4;
private static final int __EXPIRATION_ISSET_ID = 5;
private static final int __SCHEMA_VERSION_ISSET_ID = 6;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.ALTER_VERSION,_Fields.ALTER_TABLET_TYPE,_Fields.IS_DROP_OP,_Fields.ALTER_INVERTED_INDEXES,_Fields.INDEXES_DESC,_Fields.COLUMNS,_Fields.JOB_ID,_Fields.EXPIRATION,_Fields.SCHEMA_VERSION};
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.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.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.I32 , "TSchemaHash")));
tmpMap.put(_Fields.ALTER_VERSION, new org.apache.thrift.meta_data.FieldMetaData("alter_version", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "TVersion")));
tmpMap.put(_Fields.ALTER_TABLET_TYPE, new org.apache.thrift.meta_data.FieldMetaData("alter_tablet_type", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TAlterTabletType.class)));
tmpMap.put(_Fields.IS_DROP_OP, new org.apache.thrift.meta_data.FieldMetaData("is_drop_op", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.ALTER_INVERTED_INDEXES, new org.apache.thrift.meta_data.FieldMetaData("alter_inverted_indexes", 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, org.apache.doris.thrift.TOlapTableIndex.class))));
tmpMap.put(_Fields.INDEXES_DESC, new org.apache.thrift.meta_data.FieldMetaData("indexes_desc", 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, org.apache.doris.thrift.TOlapTableIndex.class))));
tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", 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, org.apache.doris.thrift.TColumn.class))));
tmpMap.put(_Fields.JOB_ID, new org.apache.thrift.meta_data.FieldMetaData("job_id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.EXPIRATION, new org.apache.thrift.meta_data.FieldMetaData("expiration", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.SCHEMA_VERSION, new org.apache.thrift.meta_data.FieldMetaData("schema_version", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TAlterInvertedIndexReq.class, metaDataMap);
}
public TAlterInvertedIndexReq() {
this.alter_tablet_type = org.apache.doris.thrift.TAlterTabletType.SCHEMA_CHANGE;
this.is_drop_op = false;
}
public TAlterInvertedIndexReq(
long tablet_id,
int schema_hash)
{
this();
this.tablet_id = tablet_id;
setTabletIdIsSet(true);
this.schema_hash = schema_hash;
setSchemaHashIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TAlterInvertedIndexReq(TAlterInvertedIndexReq other) {
__isset_bitfield = other.__isset_bitfield;
this.tablet_id = other.tablet_id;
this.schema_hash = other.schema_hash;
this.alter_version = other.alter_version;
if (other.isSetAlterTabletType()) {
this.alter_tablet_type = other.alter_tablet_type;
}
this.is_drop_op = other.is_drop_op;
if (other.isSetAlterInvertedIndexes()) {
java.util.List<org.apache.doris.thrift.TOlapTableIndex> __this__alter_inverted_indexes = new java.util.ArrayList<org.apache.doris.thrift.TOlapTableIndex>(other.alter_inverted_indexes.size());
for (org.apache.doris.thrift.TOlapTableIndex other_element : other.alter_inverted_indexes) {
__this__alter_inverted_indexes.add(new org.apache.doris.thrift.TOlapTableIndex(other_element));
}
this.alter_inverted_indexes = __this__alter_inverted_indexes;
}
if (other.isSetIndexesDesc()) {
java.util.List<org.apache.doris.thrift.TOlapTableIndex> __this__indexes_desc = new java.util.ArrayList<org.apache.doris.thrift.TOlapTableIndex>(other.indexes_desc.size());
for (org.apache.doris.thrift.TOlapTableIndex other_element : other.indexes_desc) {
__this__indexes_desc.add(new org.apache.doris.thrift.TOlapTableIndex(other_element));
}
this.indexes_desc = __this__indexes_desc;
}
if (other.isSetColumns()) {
java.util.List<org.apache.doris.thrift.TColumn> __this__columns = new java.util.ArrayList<org.apache.doris.thrift.TColumn>(other.columns.size());
for (org.apache.doris.thrift.TColumn other_element : other.columns) {
__this__columns.add(new org.apache.doris.thrift.TColumn(other_element));
}
this.columns = __this__columns;
}
this.job_id = other.job_id;
this.expiration = other.expiration;
this.schema_version = other.schema_version;
}
public TAlterInvertedIndexReq deepCopy() {
return new TAlterInvertedIndexReq(this);
}
@Override
public void clear() {
setTabletIdIsSet(false);
this.tablet_id = 0;
setSchemaHashIsSet(false);
this.schema_hash = 0;
setAlterVersionIsSet(false);
this.alter_version = 0;
this.alter_tablet_type = org.apache.doris.thrift.TAlterTabletType.SCHEMA_CHANGE;
this.is_drop_op = false;
this.alter_inverted_indexes = null;
this.indexes_desc = null;
this.columns = null;
setJobIdIsSet(false);
this.job_id = 0;
setExpirationIsSet(false);
this.expiration = 0;
setSchemaVersionIsSet(false);
this.schema_version = 0;
}
public long getTabletId() {
return this.tablet_id;
}
public TAlterInvertedIndexReq 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);
}
public int getSchemaHash() {
return this.schema_hash;
}
public TAlterInvertedIndexReq setSchemaHash(int schema_hash) {
this.schema_hash = schema_hash;
setSchemaHashIsSet(true);
return this;
}
public void unsetSchemaHash() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SCHEMA_HASH_ISSET_ID);
}
/** Returns true if field schema_hash is set (has been assigned a value) and false otherwise */
public boolean isSetSchemaHash() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SCHEMA_HASH_ISSET_ID);
}
public void setSchemaHashIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SCHEMA_HASH_ISSET_ID, value);
}
public long getAlterVersion() {
return this.alter_version;
}
public TAlterInvertedIndexReq setAlterVersion(long alter_version) {
this.alter_version = alter_version;
setAlterVersionIsSet(true);
return this;
}
public void unsetAlterVersion() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ALTER_VERSION_ISSET_ID);
}
/** Returns true if field alter_version is set (has been assigned a value) and false otherwise */
public boolean isSetAlterVersion() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ALTER_VERSION_ISSET_ID);
}
public void setAlterVersionIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ALTER_VERSION_ISSET_ID, value);
}
/**
*
* @see TAlterTabletType
*/
@org.apache.thrift.annotation.Nullable
public TAlterTabletType getAlterTabletType() {
return this.alter_tablet_type;
}
/**
*
* @see TAlterTabletType
*/
public TAlterInvertedIndexReq setAlterTabletType(@org.apache.thrift.annotation.Nullable TAlterTabletType alter_tablet_type) {
this.alter_tablet_type = alter_tablet_type;
return this;
}
public void unsetAlterTabletType() {
this.alter_tablet_type = null;
}
/** Returns true if field alter_tablet_type is set (has been assigned a value) and false otherwise */
public boolean isSetAlterTabletType() {
return this.alter_tablet_type != null;
}
public void setAlterTabletTypeIsSet(boolean value) {
if (!value) {
this.alter_tablet_type = null;
}
}
public boolean isIsDropOp() {
return this.is_drop_op;
}
public TAlterInvertedIndexReq setIsDropOp(boolean is_drop_op) {
this.is_drop_op = is_drop_op;
setIsDropOpIsSet(true);
return this;
}
public void unsetIsDropOp() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_DROP_OP_ISSET_ID);
}
/** Returns true if field is_drop_op is set (has been assigned a value) and false otherwise */
public boolean isSetIsDropOp() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_DROP_OP_ISSET_ID);
}
public void setIsDropOpIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_DROP_OP_ISSET_ID, value);
}
public int getAlterInvertedIndexesSize() {
return (this.alter_inverted_indexes == null) ? 0 : this.alter_inverted_indexes.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<org.apache.doris.thrift.TOlapTableIndex> getAlterInvertedIndexesIterator() {
return (this.alter_inverted_indexes == null) ? null : this.alter_inverted_indexes.iterator();
}
public void addToAlterInvertedIndexes(org.apache.doris.thrift.TOlapTableIndex elem) {
if (this.alter_inverted_indexes == null) {
this.alter_inverted_indexes = new java.util.ArrayList<org.apache.doris.thrift.TOlapTableIndex>();
}
this.alter_inverted_indexes.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<org.apache.doris.thrift.TOlapTableIndex> getAlterInvertedIndexes() {
return this.alter_inverted_indexes;
}
public TAlterInvertedIndexReq setAlterInvertedIndexes(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TOlapTableIndex> alter_inverted_indexes) {
this.alter_inverted_indexes = alter_inverted_indexes;
return this;
}
public void unsetAlterInvertedIndexes() {
this.alter_inverted_indexes = null;
}
/** Returns true if field alter_inverted_indexes is set (has been assigned a value) and false otherwise */
public boolean isSetAlterInvertedIndexes() {
return this.alter_inverted_indexes != null;
}
public void setAlterInvertedIndexesIsSet(boolean value) {
if (!value) {
this.alter_inverted_indexes = null;
}
}
public int getIndexesDescSize() {
return (this.indexes_desc == null) ? 0 : this.indexes_desc.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<org.apache.doris.thrift.TOlapTableIndex> getIndexesDescIterator() {
return (this.indexes_desc == null) ? null : this.indexes_desc.iterator();
}
public void addToIndexesDesc(org.apache.doris.thrift.TOlapTableIndex elem) {
if (this.indexes_desc == null) {
this.indexes_desc = new java.util.ArrayList<org.apache.doris.thrift.TOlapTableIndex>();
}
this.indexes_desc.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<org.apache.doris.thrift.TOlapTableIndex> getIndexesDesc() {
return this.indexes_desc;
}
public TAlterInvertedIndexReq setIndexesDesc(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TOlapTableIndex> indexes_desc) {
this.indexes_desc = indexes_desc;
return this;
}
public void unsetIndexesDesc() {
this.indexes_desc = null;
}
/** Returns true if field indexes_desc is set (has been assigned a value) and false otherwise */
public boolean isSetIndexesDesc() {
return this.indexes_desc != null;
}
public void setIndexesDescIsSet(boolean value) {
if (!value) {
this.indexes_desc = null;
}
}
public int getColumnsSize() {
return (this.columns == null) ? 0 : this.columns.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<org.apache.doris.thrift.TColumn> getColumnsIterator() {
return (this.columns == null) ? null : this.columns.iterator();
}
public void addToColumns(org.apache.doris.thrift.TColumn elem) {
if (this.columns == null) {
this.columns = new java.util.ArrayList<org.apache.doris.thrift.TColumn>();
}
this.columns.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<org.apache.doris.thrift.TColumn> getColumns() {
return this.columns;
}
public TAlterInvertedIndexReq setColumns(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TColumn> columns) {
this.columns = columns;
return this;
}
public void unsetColumns() {
this.columns = null;
}
/** Returns true if field columns is set (has been assigned a value) and false otherwise */
public boolean isSetColumns() {
return this.columns != null;
}
public void setColumnsIsSet(boolean value) {
if (!value) {
this.columns = null;
}
}
public long getJobId() {
return this.job_id;
}
public TAlterInvertedIndexReq setJobId(long job_id) {
this.job_id = job_id;
setJobIdIsSet(true);
return this;
}
public void unsetJobId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __JOB_ID_ISSET_ID);
}
/** Returns true if field job_id is set (has been assigned a value) and false otherwise */
public boolean isSetJobId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __JOB_ID_ISSET_ID);
}
public void setJobIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __JOB_ID_ISSET_ID, value);
}
public long getExpiration() {
return this.expiration;
}
public TAlterInvertedIndexReq setExpiration(long expiration) {
this.expiration = expiration;
setExpirationIsSet(true);
return this;
}
public void unsetExpiration() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EXPIRATION_ISSET_ID);
}
/** Returns true if field expiration is set (has been assigned a value) and false otherwise */
public boolean isSetExpiration() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXPIRATION_ISSET_ID);
}
public void setExpirationIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EXPIRATION_ISSET_ID, value);
}
public int getSchemaVersion() {
return this.schema_version;
}
public TAlterInvertedIndexReq setSchemaVersion(int schema_version) {
this.schema_version = schema_version;
setSchemaVersionIsSet(true);
return this;
}
public void unsetSchemaVersion() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SCHEMA_VERSION_ISSET_ID);
}
/** Returns true if field schema_version is set (has been assigned a value) and false otherwise */
public boolean isSetSchemaVersion() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SCHEMA_VERSION_ISSET_ID);
}
public void setSchemaVersionIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SCHEMA_VERSION_ISSET_ID, value);
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TABLET_ID:
if (value == null) {
unsetTabletId();
} else {
setTabletId((java.lang.Long)value);
}
break;
case SCHEMA_HASH:
if (value == null) {
unsetSchemaHash();
} else {
setSchemaHash((java.lang.Integer)value);
}
break;
case ALTER_VERSION:
if (value == null) {
unsetAlterVersion();
} else {
setAlterVersion((java.lang.Long)value);
}
break;
case ALTER_TABLET_TYPE:
if (value == null) {
unsetAlterTabletType();
} else {
setAlterTabletType((TAlterTabletType)value);
}
break;
case IS_DROP_OP:
if (value == null) {
unsetIsDropOp();
} else {
setIsDropOp((java.lang.Boolean)value);
}
break;
case ALTER_INVERTED_INDEXES:
if (value == null) {
unsetAlterInvertedIndexes();
} else {
setAlterInvertedIndexes((java.util.List<org.apache.doris.thrift.TOlapTableIndex>)value);
}
break;
case INDEXES_DESC:
if (value == null) {
unsetIndexesDesc();
} else {
setIndexesDesc((java.util.List<org.apache.doris.thrift.TOlapTableIndex>)value);
}
break;
case COLUMNS:
if (value == null) {
unsetColumns();
} else {
setColumns((java.util.List<org.apache.doris.thrift.TColumn>)value);
}
break;
case JOB_ID:
if (value == null) {
unsetJobId();
} else {
setJobId((java.lang.Long)value);
}
break;
case EXPIRATION:
if (value == null) {
unsetExpiration();
} else {
setExpiration((java.lang.Long)value);
}
break;
case SCHEMA_VERSION:
if (value == null) {
unsetSchemaVersion();
} else {
setSchemaVersion((java.lang.Integer)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TABLET_ID:
return getTabletId();
case SCHEMA_HASH:
return getSchemaHash();
case ALTER_VERSION:
return getAlterVersion();
case ALTER_TABLET_TYPE:
return getAlterTabletType();
case IS_DROP_OP:
return isIsDropOp();
case ALTER_INVERTED_INDEXES:
return getAlterInvertedIndexes();
case INDEXES_DESC:
return getIndexesDesc();
case COLUMNS:
return getColumns();
case JOB_ID:
return getJobId();
case EXPIRATION:
return getExpiration();
case SCHEMA_VERSION:
return getSchemaVersion();
}
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 TABLET_ID:
return isSetTabletId();
case SCHEMA_HASH:
return isSetSchemaHash();
case ALTER_VERSION:
return isSetAlterVersion();
case ALTER_TABLET_TYPE:
return isSetAlterTabletType();
case IS_DROP_OP:
return isSetIsDropOp();
case ALTER_INVERTED_INDEXES:
return isSetAlterInvertedIndexes();
case INDEXES_DESC:
return isSetIndexesDesc();
case COLUMNS:
return isSetColumns();
case JOB_ID:
return isSetJobId();
case EXPIRATION:
return isSetExpiration();
case SCHEMA_VERSION:
return isSetSchemaVersion();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TAlterInvertedIndexReq)
return this.equals((TAlterInvertedIndexReq)that);
return false;
}
public boolean equals(TAlterInvertedIndexReq that) {
if (that == null)
return false;
if (this == that)
return true;
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_schema_hash = true;
boolean that_present_schema_hash = true;
if (this_present_schema_hash || that_present_schema_hash) {
if (!(this_present_schema_hash && that_present_schema_hash))
return false;
if (this.schema_hash != that.schema_hash)
return false;
}
boolean this_present_alter_version = true && this.isSetAlterVersion();
boolean that_present_alter_version = true && that.isSetAlterVersion();
if (this_present_alter_version || that_present_alter_version) {
if (!(this_present_alter_version && that_present_alter_version))
return false;
if (this.alter_version != that.alter_version)
return false;
}
boolean this_present_alter_tablet_type = true && this.isSetAlterTabletType();
boolean that_present_alter_tablet_type = true && that.isSetAlterTabletType();
if (this_present_alter_tablet_type || that_present_alter_tablet_type) {
if (!(this_present_alter_tablet_type && that_present_alter_tablet_type))
return false;
if (!this.alter_tablet_type.equals(that.alter_tablet_type))
return false;
}
boolean this_present_is_drop_op = true && this.isSetIsDropOp();
boolean that_present_is_drop_op = true && that.isSetIsDropOp();
if (this_present_is_drop_op || that_present_is_drop_op) {
if (!(this_present_is_drop_op && that_present_is_drop_op))
return false;
if (this.is_drop_op != that.is_drop_op)
return false;
}
boolean this_present_alter_inverted_indexes = true && this.isSetAlterInvertedIndexes();
boolean that_present_alter_inverted_indexes = true && that.isSetAlterInvertedIndexes();
if (this_present_alter_inverted_indexes || that_present_alter_inverted_indexes) {
if (!(this_present_alter_inverted_indexes && that_present_alter_inverted_indexes))
return false;
if (!this.alter_inverted_indexes.equals(that.alter_inverted_indexes))
return false;
}
boolean this_present_indexes_desc = true && this.isSetIndexesDesc();
boolean that_present_indexes_desc = true && that.isSetIndexesDesc();
if (this_present_indexes_desc || that_present_indexes_desc) {
if (!(this_present_indexes_desc && that_present_indexes_desc))
return false;
if (!this.indexes_desc.equals(that.indexes_desc))
return false;
}
boolean this_present_columns = true && this.isSetColumns();
boolean that_present_columns = true && that.isSetColumns();
if (this_present_columns || that_present_columns) {
if (!(this_present_columns && that_present_columns))
return false;
if (!this.columns.equals(that.columns))
return false;
}
boolean this_present_job_id = true && this.isSetJobId();
boolean that_present_job_id = true && that.isSetJobId();
if (this_present_job_id || that_present_job_id) {
if (!(this_present_job_id && that_present_job_id))
return false;
if (this.job_id != that.job_id)
return false;
}
boolean this_present_expiration = true && this.isSetExpiration();
boolean that_present_expiration = true && that.isSetExpiration();
if (this_present_expiration || that_present_expiration) {
if (!(this_present_expiration && that_present_expiration))
return false;
if (this.expiration != that.expiration)
return false;
}
boolean this_present_schema_version = true && this.isSetSchemaVersion();
boolean that_present_schema_version = true && that.isSetSchemaVersion();
if (this_present_schema_version || that_present_schema_version) {
if (!(this_present_schema_version && that_present_schema_version))
return false;
if (this.schema_version != that.schema_version)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(tablet_id);
hashCode = hashCode * 8191 + schema_hash;
hashCode = hashCode * 8191 + ((isSetAlterVersion()) ? 131071 : 524287);
if (isSetAlterVersion())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(alter_version);
hashCode = hashCode * 8191 + ((isSetAlterTabletType()) ? 131071 : 524287);
if (isSetAlterTabletType())
hashCode = hashCode * 8191 + alter_tablet_type.getValue();
hashCode = hashCode * 8191 + ((isSetIsDropOp()) ? 131071 : 524287);
if (isSetIsDropOp())
hashCode = hashCode * 8191 + ((is_drop_op) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetAlterInvertedIndexes()) ? 131071 : 524287);
if (isSetAlterInvertedIndexes())
hashCode = hashCode * 8191 + alter_inverted_indexes.hashCode();
hashCode = hashCode * 8191 + ((isSetIndexesDesc()) ? 131071 : 524287);
if (isSetIndexesDesc())
hashCode = hashCode * 8191 + indexes_desc.hashCode();
hashCode = hashCode * 8191 + ((isSetColumns()) ? 131071 : 524287);
if (isSetColumns())
hashCode = hashCode * 8191 + columns.hashCode();
hashCode = hashCode * 8191 + ((isSetJobId()) ? 131071 : 524287);
if (isSetJobId())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(job_id);
hashCode = hashCode * 8191 + ((isSetExpiration()) ? 131071 : 524287);
if (isSetExpiration())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(expiration);
hashCode = hashCode * 8191 + ((isSetSchemaVersion()) ? 131071 : 524287);
if (isSetSchemaVersion())
hashCode = hashCode * 8191 + schema_version;
return hashCode;
}
@Override
public int compareTo(TAlterInvertedIndexReq other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
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(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(isSetAlterVersion(), other.isSetAlterVersion());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAlterVersion()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.alter_version, other.alter_version);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetAlterTabletType(), other.isSetAlterTabletType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAlterTabletType()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.alter_tablet_type, other.alter_tablet_type);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetIsDropOp(), other.isSetIsDropOp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIsDropOp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_drop_op, other.is_drop_op);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetAlterInvertedIndexes(), other.isSetAlterInvertedIndexes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAlterInvertedIndexes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.alter_inverted_indexes, other.alter_inverted_indexes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetIndexesDesc(), other.isSetIndexesDesc());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIndexesDesc()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.indexes_desc, other.indexes_desc);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumns(), other.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumns()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, other.columns);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetJobId(), other.isSetJobId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetJobId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.job_id, other.job_id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetExpiration(), other.isSetExpiration());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExpiration()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expiration, other.expiration);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSchemaVersion(), other.isSetSchemaVersion());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSchemaVersion()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schema_version, other.schema_version);
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("TAlterInvertedIndexReq(");
boolean first = true;
sb.append("tablet_id:");
sb.append(this.tablet_id);
first = false;
if (!first) sb.append(", ");
sb.append("schema_hash:");
sb.append(this.schema_hash);
first = false;
if (isSetAlterVersion()) {
if (!first) sb.append(", ");
sb.append("alter_version:");
sb.append(this.alter_version);
first = false;
}
if (isSetAlterTabletType()) {
if (!first) sb.append(", ");
sb.append("alter_tablet_type:");
if (this.alter_tablet_type == null) {
sb.append("null");
} else {
sb.append(this.alter_tablet_type);
}
first = false;
}
if (isSetIsDropOp()) {
if (!first) sb.append(", ");
sb.append("is_drop_op:");
sb.append(this.is_drop_op);
first = false;
}
if (isSetAlterInvertedIndexes()) {
if (!first) sb.append(", ");
sb.append("alter_inverted_indexes:");
if (this.alter_inverted_indexes == null) {
sb.append("null");
} else {
sb.append(this.alter_inverted_indexes);
}
first = false;
}
if (isSetIndexesDesc()) {
if (!first) sb.append(", ");
sb.append("indexes_desc:");
if (this.indexes_desc == null) {
sb.append("null");
} else {
sb.append(this.indexes_desc);
}
first = false;
}
if (isSetColumns()) {
if (!first) sb.append(", ");
sb.append("columns:");
if (this.columns == null) {
sb.append("null");
} else {
sb.append(this.columns);
}
first = false;
}
if (isSetJobId()) {
if (!first) sb.append(", ");
sb.append("job_id:");
sb.append(this.job_id);
first = false;
}
if (isSetExpiration()) {
if (!first) sb.append(", ");
sb.append("expiration:");
sb.append(this.expiration);
first = false;
}
if (isSetSchemaVersion()) {
if (!first) sb.append(", ");
sb.append("schema_version:");
sb.append(this.schema_version);
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'tablet_id' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'schema_hash' because it's a primitive and you chose the non-beans generator.
// 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 TAlterInvertedIndexReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TAlterInvertedIndexReqStandardScheme getScheme() {
return new TAlterInvertedIndexReqStandardScheme();
}
}
private static class TAlterInvertedIndexReqStandardScheme extends org.apache.thrift.scheme.StandardScheme<TAlterInvertedIndexReq> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TAlterInvertedIndexReq 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: // 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 2: // SCHEMA_HASH
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.schema_hash = iprot.readI32();
struct.setSchemaHashIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // ALTER_VERSION
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.alter_version = iprot.readI64();
struct.setAlterVersionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // ALTER_TABLET_TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.alter_tablet_type = org.apache.doris.thrift.TAlterTabletType.findByValue(iprot.readI32());
struct.setAlterTabletTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // IS_DROP_OP
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.is_drop_op = iprot.readBool();
struct.setIsDropOpIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // ALTER_INVERTED_INDEXES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list98 = iprot.readListBegin();
struct.alter_inverted_indexes = new java.util.ArrayList<org.apache.doris.thrift.TOlapTableIndex>(_list98.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TOlapTableIndex _elem99;
for (int _i100 = 0; _i100 < _list98.size; ++_i100)
{
_elem99 = new org.apache.doris.thrift.TOlapTableIndex();
_elem99.read(iprot);
struct.alter_inverted_indexes.add(_elem99);
}
iprot.readListEnd();
}
struct.setAlterInvertedIndexesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // INDEXES_DESC
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list101 = iprot.readListBegin();
struct.indexes_desc = new java.util.ArrayList<org.apache.doris.thrift.TOlapTableIndex>(_list101.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TOlapTableIndex _elem102;
for (int _i103 = 0; _i103 < _list101.size; ++_i103)
{
_elem102 = new org.apache.doris.thrift.TOlapTableIndex();
_elem102.read(iprot);
struct.indexes_desc.add(_elem102);
}
iprot.readListEnd();
}
struct.setIndexesDescIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // COLUMNS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list104 = iprot.readListBegin();
struct.columns = new java.util.ArrayList<org.apache.doris.thrift.TColumn>(_list104.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TColumn _elem105;
for (int _i106 = 0; _i106 < _list104.size; ++_i106)
{
_elem105 = new org.apache.doris.thrift.TColumn();
_elem105.read(iprot);
struct.columns.add(_elem105);
}
iprot.readListEnd();
}
struct.setColumnsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // JOB_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.job_id = iprot.readI64();
struct.setJobIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // EXPIRATION
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.expiration = iprot.readI64();
struct.setExpirationIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // SCHEMA_VERSION
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.schema_version = iprot.readI32();
struct.setSchemaVersionIsSet(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());
}
if (!struct.isSetSchemaHash()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'schema_hash' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TAlterInvertedIndexReq struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(TABLET_ID_FIELD_DESC);
oprot.writeI64(struct.tablet_id);
oprot.writeFieldEnd();
oprot.writeFieldBegin(SCHEMA_HASH_FIELD_DESC);
oprot.writeI32(struct.schema_hash);
oprot.writeFieldEnd();
if (struct.isSetAlterVersion()) {
oprot.writeFieldBegin(ALTER_VERSION_FIELD_DESC);
oprot.writeI64(struct.alter_version);
oprot.writeFieldEnd();
}
if (struct.alter_tablet_type != null) {
if (struct.isSetAlterTabletType()) {
oprot.writeFieldBegin(ALTER_TABLET_TYPE_FIELD_DESC);
oprot.writeI32(struct.alter_tablet_type.getValue());
oprot.writeFieldEnd();
}
}
if (struct.isSetIsDropOp()) {
oprot.writeFieldBegin(IS_DROP_OP_FIELD_DESC);
oprot.writeBool(struct.is_drop_op);
oprot.writeFieldEnd();
}
if (struct.alter_inverted_indexes != null) {
if (struct.isSetAlterInvertedIndexes()) {
oprot.writeFieldBegin(ALTER_INVERTED_INDEXES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.alter_inverted_indexes.size()));
for (org.apache.doris.thrift.TOlapTableIndex _iter107 : struct.alter_inverted_indexes)
{
_iter107.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.indexes_desc != null) {
if (struct.isSetIndexesDesc()) {
oprot.writeFieldBegin(INDEXES_DESC_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.indexes_desc.size()));
for (org.apache.doris.thrift.TOlapTableIndex _iter108 : struct.indexes_desc)
{
_iter108.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.columns != null) {
if (struct.isSetColumns()) {
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
for (org.apache.doris.thrift.TColumn _iter109 : struct.columns)
{
_iter109.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.isSetJobId()) {
oprot.writeFieldBegin(JOB_ID_FIELD_DESC);
oprot.writeI64(struct.job_id);
oprot.writeFieldEnd();
}
if (struct.isSetExpiration()) {
oprot.writeFieldBegin(EXPIRATION_FIELD_DESC);
oprot.writeI64(struct.expiration);
oprot.writeFieldEnd();
}
if (struct.isSetSchemaVersion()) {
oprot.writeFieldBegin(SCHEMA_VERSION_FIELD_DESC);
oprot.writeI32(struct.schema_version);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TAlterInvertedIndexReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TAlterInvertedIndexReqTupleScheme getScheme() {
return new TAlterInvertedIndexReqTupleScheme();
}
}
private static class TAlterInvertedIndexReqTupleScheme extends org.apache.thrift.scheme.TupleScheme<TAlterInvertedIndexReq> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TAlterInvertedIndexReq struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.tablet_id);
oprot.writeI32(struct.schema_hash);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetAlterVersion()) {
optionals.set(0);
}
if (struct.isSetAlterTabletType()) {
optionals.set(1);
}
if (struct.isSetIsDropOp()) {
optionals.set(2);
}
if (struct.isSetAlterInvertedIndexes()) {
optionals.set(3);
}
if (struct.isSetIndexesDesc()) {
optionals.set(4);
}
if (struct.isSetColumns()) {
optionals.set(5);
}
if (struct.isSetJobId()) {
optionals.set(6);
}
if (struct.isSetExpiration()) {
optionals.set(7);
}
if (struct.isSetSchemaVersion()) {
optionals.set(8);
}
oprot.writeBitSet(optionals, 9);
if (struct.isSetAlterVersion()) {
oprot.writeI64(struct.alter_version);
}
if (struct.isSetAlterTabletType()) {
oprot.writeI32(struct.alter_tablet_type.getValue());
}
if (struct.isSetIsDropOp()) {
oprot.writeBool(struct.is_drop_op);
}
if (struct.isSetAlterInvertedIndexes()) {
{
oprot.writeI32(struct.alter_inverted_indexes.size());
for (org.apache.doris.thrift.TOlapTableIndex _iter110 : struct.alter_inverted_indexes)
{
_iter110.write(oprot);
}
}
}
if (struct.isSetIndexesDesc()) {
{
oprot.writeI32(struct.indexes_desc.size());
for (org.apache.doris.thrift.TOlapTableIndex _iter111 : struct.indexes_desc)
{
_iter111.write(oprot);
}
}
}
if (struct.isSetColumns()) {
{
oprot.writeI32(struct.columns.size());
for (org.apache.doris.thrift.TColumn _iter112 : struct.columns)
{
_iter112.write(oprot);
}
}
}
if (struct.isSetJobId()) {
oprot.writeI64(struct.job_id);
}
if (struct.isSetExpiration()) {
oprot.writeI64(struct.expiration);
}
if (struct.isSetSchemaVersion()) {
oprot.writeI32(struct.schema_version);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TAlterInvertedIndexReq struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.tablet_id = iprot.readI64();
struct.setTabletIdIsSet(true);
struct.schema_hash = iprot.readI32();
struct.setSchemaHashIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(9);
if (incoming.get(0)) {
struct.alter_version = iprot.readI64();
struct.setAlterVersionIsSet(true);
}
if (incoming.get(1)) {
struct.alter_tablet_type = org.apache.doris.thrift.TAlterTabletType.findByValue(iprot.readI32());
struct.setAlterTabletTypeIsSet(true);
}
if (incoming.get(2)) {
struct.is_drop_op = iprot.readBool();
struct.setIsDropOpIsSet(true);
}
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TList _list113 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.alter_inverted_indexes = new java.util.ArrayList<org.apache.doris.thrift.TOlapTableIndex>(_list113.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TOlapTableIndex _elem114;
for (int _i115 = 0; _i115 < _list113.size; ++_i115)
{
_elem114 = new org.apache.doris.thrift.TOlapTableIndex();
_elem114.read(iprot);
struct.alter_inverted_indexes.add(_elem114);
}
}
struct.setAlterInvertedIndexesIsSet(true);
}
if (incoming.get(4)) {
{
org.apache.thrift.protocol.TList _list116 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.indexes_desc = new java.util.ArrayList<org.apache.doris.thrift.TOlapTableIndex>(_list116.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TOlapTableIndex _elem117;
for (int _i118 = 0; _i118 < _list116.size; ++_i118)
{
_elem117 = new org.apache.doris.thrift.TOlapTableIndex();
_elem117.read(iprot);
struct.indexes_desc.add(_elem117);
}
}
struct.setIndexesDescIsSet(true);
}
if (incoming.get(5)) {
{
org.apache.thrift.protocol.TList _list119 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.columns = new java.util.ArrayList<org.apache.doris.thrift.TColumn>(_list119.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TColumn _elem120;
for (int _i121 = 0; _i121 < _list119.size; ++_i121)
{
_elem120 = new org.apache.doris.thrift.TColumn();
_elem120.read(iprot);
struct.columns.add(_elem120);
}
}
struct.setColumnsIsSet(true);
}
if (incoming.get(6)) {
struct.job_id = iprot.readI64();
struct.setJobIdIsSet(true);
}
if (incoming.get(7)) {
struct.expiration = iprot.readI64();
struct.setExpirationIsSet(true);
}
if (incoming.get(8)) {
struct.schema_version = iprot.readI32();
struct.setSchemaVersionIsSet(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();
}
}