TMergePartitionInfo.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 TMergePartitionInfo implements org.apache.thrift.TBase<TMergePartitionInfo, TMergePartitionInfo._Fields>, java.io.Serializable, Cloneable, Comparable<TMergePartitionInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TMergePartitionInfo");
private static final org.apache.thrift.protocol.TField OPERATION_EXPR_FIELD_DESC = new org.apache.thrift.protocol.TField("operation_expr", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField INSERT_PARTITION_EXPRS_FIELD_DESC = new org.apache.thrift.protocol.TField("insert_partition_exprs", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField DELETE_PARTITION_EXPRS_FIELD_DESC = new org.apache.thrift.protocol.TField("delete_partition_exprs", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField INSERT_RANDOM_FIELD_DESC = new org.apache.thrift.protocol.TField("insert_random", org.apache.thrift.protocol.TType.BOOL, (short)4);
private static final org.apache.thrift.protocol.TField INSERT_PARTITION_FIELDS_FIELD_DESC = new org.apache.thrift.protocol.TField("insert_partition_fields", org.apache.thrift.protocol.TType.LIST, (short)5);
private static final org.apache.thrift.protocol.TField PARTITION_SPEC_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("partition_spec_id", org.apache.thrift.protocol.TType.I32, (short)6);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TMergePartitionInfoStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TMergePartitionInfoTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr operation_expr; // required
public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TExpr> insert_partition_exprs; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TExpr> delete_partition_exprs; // optional
public boolean insert_random; // required
public @org.apache.thrift.annotation.Nullable java.util.List<TIcebergPartitionField> insert_partition_fields; // optional
public int partition_spec_id; // 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 {
OPERATION_EXPR((short)1, "operation_expr"),
INSERT_PARTITION_EXPRS((short)2, "insert_partition_exprs"),
DELETE_PARTITION_EXPRS((short)3, "delete_partition_exprs"),
INSERT_RANDOM((short)4, "insert_random"),
INSERT_PARTITION_FIELDS((short)5, "insert_partition_fields"),
PARTITION_SPEC_ID((short)6, "partition_spec_id");
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: // OPERATION_EXPR
return OPERATION_EXPR;
case 2: // INSERT_PARTITION_EXPRS
return INSERT_PARTITION_EXPRS;
case 3: // DELETE_PARTITION_EXPRS
return DELETE_PARTITION_EXPRS;
case 4: // INSERT_RANDOM
return INSERT_RANDOM;
case 5: // INSERT_PARTITION_FIELDS
return INSERT_PARTITION_FIELDS;
case 6: // PARTITION_SPEC_ID
return PARTITION_SPEC_ID;
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 __INSERT_RANDOM_ISSET_ID = 0;
private static final int __PARTITION_SPEC_ID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.INSERT_PARTITION_EXPRS,_Fields.DELETE_PARTITION_EXPRS,_Fields.INSERT_PARTITION_FIELDS,_Fields.PARTITION_SPEC_ID};
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.OPERATION_EXPR, new org.apache.thrift.meta_data.FieldMetaData("operation_expr", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TExpr.class)));
tmpMap.put(_Fields.INSERT_PARTITION_EXPRS, new org.apache.thrift.meta_data.FieldMetaData("insert_partition_exprs", 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.TExpr.class))));
tmpMap.put(_Fields.DELETE_PARTITION_EXPRS, new org.apache.thrift.meta_data.FieldMetaData("delete_partition_exprs", 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.TExpr.class))));
tmpMap.put(_Fields.INSERT_RANDOM, new org.apache.thrift.meta_data.FieldMetaData("insert_random", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.INSERT_PARTITION_FIELDS, new org.apache.thrift.meta_data.FieldMetaData("insert_partition_fields", 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, TIcebergPartitionField.class))));
tmpMap.put(_Fields.PARTITION_SPEC_ID, new org.apache.thrift.meta_data.FieldMetaData("partition_spec_id", 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(TMergePartitionInfo.class, metaDataMap);
}
public TMergePartitionInfo() {
}
public TMergePartitionInfo(
org.apache.doris.thrift.TExpr operation_expr,
boolean insert_random)
{
this();
this.operation_expr = operation_expr;
this.insert_random = insert_random;
setInsertRandomIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TMergePartitionInfo(TMergePartitionInfo other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetOperationExpr()) {
this.operation_expr = new org.apache.doris.thrift.TExpr(other.operation_expr);
}
if (other.isSetInsertPartitionExprs()) {
java.util.List<org.apache.doris.thrift.TExpr> __this__insert_partition_exprs = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(other.insert_partition_exprs.size());
for (org.apache.doris.thrift.TExpr other_element : other.insert_partition_exprs) {
__this__insert_partition_exprs.add(new org.apache.doris.thrift.TExpr(other_element));
}
this.insert_partition_exprs = __this__insert_partition_exprs;
}
if (other.isSetDeletePartitionExprs()) {
java.util.List<org.apache.doris.thrift.TExpr> __this__delete_partition_exprs = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(other.delete_partition_exprs.size());
for (org.apache.doris.thrift.TExpr other_element : other.delete_partition_exprs) {
__this__delete_partition_exprs.add(new org.apache.doris.thrift.TExpr(other_element));
}
this.delete_partition_exprs = __this__delete_partition_exprs;
}
this.insert_random = other.insert_random;
if (other.isSetInsertPartitionFields()) {
java.util.List<TIcebergPartitionField> __this__insert_partition_fields = new java.util.ArrayList<TIcebergPartitionField>(other.insert_partition_fields.size());
for (TIcebergPartitionField other_element : other.insert_partition_fields) {
__this__insert_partition_fields.add(new TIcebergPartitionField(other_element));
}
this.insert_partition_fields = __this__insert_partition_fields;
}
this.partition_spec_id = other.partition_spec_id;
}
public TMergePartitionInfo deepCopy() {
return new TMergePartitionInfo(this);
}
@Override
public void clear() {
this.operation_expr = null;
this.insert_partition_exprs = null;
this.delete_partition_exprs = null;
setInsertRandomIsSet(false);
this.insert_random = false;
this.insert_partition_fields = null;
setPartitionSpecIdIsSet(false);
this.partition_spec_id = 0;
}
@org.apache.thrift.annotation.Nullable
public org.apache.doris.thrift.TExpr getOperationExpr() {
return this.operation_expr;
}
public TMergePartitionInfo setOperationExpr(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr operation_expr) {
this.operation_expr = operation_expr;
return this;
}
public void unsetOperationExpr() {
this.operation_expr = null;
}
/** Returns true if field operation_expr is set (has been assigned a value) and false otherwise */
public boolean isSetOperationExpr() {
return this.operation_expr != null;
}
public void setOperationExprIsSet(boolean value) {
if (!value) {
this.operation_expr = null;
}
}
public int getInsertPartitionExprsSize() {
return (this.insert_partition_exprs == null) ? 0 : this.insert_partition_exprs.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<org.apache.doris.thrift.TExpr> getInsertPartitionExprsIterator() {
return (this.insert_partition_exprs == null) ? null : this.insert_partition_exprs.iterator();
}
public void addToInsertPartitionExprs(org.apache.doris.thrift.TExpr elem) {
if (this.insert_partition_exprs == null) {
this.insert_partition_exprs = new java.util.ArrayList<org.apache.doris.thrift.TExpr>();
}
this.insert_partition_exprs.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<org.apache.doris.thrift.TExpr> getInsertPartitionExprs() {
return this.insert_partition_exprs;
}
public TMergePartitionInfo setInsertPartitionExprs(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TExpr> insert_partition_exprs) {
this.insert_partition_exprs = insert_partition_exprs;
return this;
}
public void unsetInsertPartitionExprs() {
this.insert_partition_exprs = null;
}
/** Returns true if field insert_partition_exprs is set (has been assigned a value) and false otherwise */
public boolean isSetInsertPartitionExprs() {
return this.insert_partition_exprs != null;
}
public void setInsertPartitionExprsIsSet(boolean value) {
if (!value) {
this.insert_partition_exprs = null;
}
}
public int getDeletePartitionExprsSize() {
return (this.delete_partition_exprs == null) ? 0 : this.delete_partition_exprs.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<org.apache.doris.thrift.TExpr> getDeletePartitionExprsIterator() {
return (this.delete_partition_exprs == null) ? null : this.delete_partition_exprs.iterator();
}
public void addToDeletePartitionExprs(org.apache.doris.thrift.TExpr elem) {
if (this.delete_partition_exprs == null) {
this.delete_partition_exprs = new java.util.ArrayList<org.apache.doris.thrift.TExpr>();
}
this.delete_partition_exprs.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<org.apache.doris.thrift.TExpr> getDeletePartitionExprs() {
return this.delete_partition_exprs;
}
public TMergePartitionInfo setDeletePartitionExprs(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TExpr> delete_partition_exprs) {
this.delete_partition_exprs = delete_partition_exprs;
return this;
}
public void unsetDeletePartitionExprs() {
this.delete_partition_exprs = null;
}
/** Returns true if field delete_partition_exprs is set (has been assigned a value) and false otherwise */
public boolean isSetDeletePartitionExprs() {
return this.delete_partition_exprs != null;
}
public void setDeletePartitionExprsIsSet(boolean value) {
if (!value) {
this.delete_partition_exprs = null;
}
}
public boolean isInsertRandom() {
return this.insert_random;
}
public TMergePartitionInfo setInsertRandom(boolean insert_random) {
this.insert_random = insert_random;
setInsertRandomIsSet(true);
return this;
}
public void unsetInsertRandom() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INSERT_RANDOM_ISSET_ID);
}
/** Returns true if field insert_random is set (has been assigned a value) and false otherwise */
public boolean isSetInsertRandom() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INSERT_RANDOM_ISSET_ID);
}
public void setInsertRandomIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INSERT_RANDOM_ISSET_ID, value);
}
public int getInsertPartitionFieldsSize() {
return (this.insert_partition_fields == null) ? 0 : this.insert_partition_fields.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TIcebergPartitionField> getInsertPartitionFieldsIterator() {
return (this.insert_partition_fields == null) ? null : this.insert_partition_fields.iterator();
}
public void addToInsertPartitionFields(TIcebergPartitionField elem) {
if (this.insert_partition_fields == null) {
this.insert_partition_fields = new java.util.ArrayList<TIcebergPartitionField>();
}
this.insert_partition_fields.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<TIcebergPartitionField> getInsertPartitionFields() {
return this.insert_partition_fields;
}
public TMergePartitionInfo setInsertPartitionFields(@org.apache.thrift.annotation.Nullable java.util.List<TIcebergPartitionField> insert_partition_fields) {
this.insert_partition_fields = insert_partition_fields;
return this;
}
public void unsetInsertPartitionFields() {
this.insert_partition_fields = null;
}
/** Returns true if field insert_partition_fields is set (has been assigned a value) and false otherwise */
public boolean isSetInsertPartitionFields() {
return this.insert_partition_fields != null;
}
public void setInsertPartitionFieldsIsSet(boolean value) {
if (!value) {
this.insert_partition_fields = null;
}
}
public int getPartitionSpecId() {
return this.partition_spec_id;
}
public TMergePartitionInfo setPartitionSpecId(int partition_spec_id) {
this.partition_spec_id = partition_spec_id;
setPartitionSpecIdIsSet(true);
return this;
}
public void unsetPartitionSpecId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PARTITION_SPEC_ID_ISSET_ID);
}
/** Returns true if field partition_spec_id is set (has been assigned a value) and false otherwise */
public boolean isSetPartitionSpecId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARTITION_SPEC_ID_ISSET_ID);
}
public void setPartitionSpecIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PARTITION_SPEC_ID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case OPERATION_EXPR:
if (value == null) {
unsetOperationExpr();
} else {
setOperationExpr((org.apache.doris.thrift.TExpr)value);
}
break;
case INSERT_PARTITION_EXPRS:
if (value == null) {
unsetInsertPartitionExprs();
} else {
setInsertPartitionExprs((java.util.List<org.apache.doris.thrift.TExpr>)value);
}
break;
case DELETE_PARTITION_EXPRS:
if (value == null) {
unsetDeletePartitionExprs();
} else {
setDeletePartitionExprs((java.util.List<org.apache.doris.thrift.TExpr>)value);
}
break;
case INSERT_RANDOM:
if (value == null) {
unsetInsertRandom();
} else {
setInsertRandom((java.lang.Boolean)value);
}
break;
case INSERT_PARTITION_FIELDS:
if (value == null) {
unsetInsertPartitionFields();
} else {
setInsertPartitionFields((java.util.List<TIcebergPartitionField>)value);
}
break;
case PARTITION_SPEC_ID:
if (value == null) {
unsetPartitionSpecId();
} else {
setPartitionSpecId((java.lang.Integer)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case OPERATION_EXPR:
return getOperationExpr();
case INSERT_PARTITION_EXPRS:
return getInsertPartitionExprs();
case DELETE_PARTITION_EXPRS:
return getDeletePartitionExprs();
case INSERT_RANDOM:
return isInsertRandom();
case INSERT_PARTITION_FIELDS:
return getInsertPartitionFields();
case PARTITION_SPEC_ID:
return getPartitionSpecId();
}
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 OPERATION_EXPR:
return isSetOperationExpr();
case INSERT_PARTITION_EXPRS:
return isSetInsertPartitionExprs();
case DELETE_PARTITION_EXPRS:
return isSetDeletePartitionExprs();
case INSERT_RANDOM:
return isSetInsertRandom();
case INSERT_PARTITION_FIELDS:
return isSetInsertPartitionFields();
case PARTITION_SPEC_ID:
return isSetPartitionSpecId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TMergePartitionInfo)
return this.equals((TMergePartitionInfo)that);
return false;
}
public boolean equals(TMergePartitionInfo that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_operation_expr = true && this.isSetOperationExpr();
boolean that_present_operation_expr = true && that.isSetOperationExpr();
if (this_present_operation_expr || that_present_operation_expr) {
if (!(this_present_operation_expr && that_present_operation_expr))
return false;
if (!this.operation_expr.equals(that.operation_expr))
return false;
}
boolean this_present_insert_partition_exprs = true && this.isSetInsertPartitionExprs();
boolean that_present_insert_partition_exprs = true && that.isSetInsertPartitionExprs();
if (this_present_insert_partition_exprs || that_present_insert_partition_exprs) {
if (!(this_present_insert_partition_exprs && that_present_insert_partition_exprs))
return false;
if (!this.insert_partition_exprs.equals(that.insert_partition_exprs))
return false;
}
boolean this_present_delete_partition_exprs = true && this.isSetDeletePartitionExprs();
boolean that_present_delete_partition_exprs = true && that.isSetDeletePartitionExprs();
if (this_present_delete_partition_exprs || that_present_delete_partition_exprs) {
if (!(this_present_delete_partition_exprs && that_present_delete_partition_exprs))
return false;
if (!this.delete_partition_exprs.equals(that.delete_partition_exprs))
return false;
}
boolean this_present_insert_random = true;
boolean that_present_insert_random = true;
if (this_present_insert_random || that_present_insert_random) {
if (!(this_present_insert_random && that_present_insert_random))
return false;
if (this.insert_random != that.insert_random)
return false;
}
boolean this_present_insert_partition_fields = true && this.isSetInsertPartitionFields();
boolean that_present_insert_partition_fields = true && that.isSetInsertPartitionFields();
if (this_present_insert_partition_fields || that_present_insert_partition_fields) {
if (!(this_present_insert_partition_fields && that_present_insert_partition_fields))
return false;
if (!this.insert_partition_fields.equals(that.insert_partition_fields))
return false;
}
boolean this_present_partition_spec_id = true && this.isSetPartitionSpecId();
boolean that_present_partition_spec_id = true && that.isSetPartitionSpecId();
if (this_present_partition_spec_id || that_present_partition_spec_id) {
if (!(this_present_partition_spec_id && that_present_partition_spec_id))
return false;
if (this.partition_spec_id != that.partition_spec_id)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetOperationExpr()) ? 131071 : 524287);
if (isSetOperationExpr())
hashCode = hashCode * 8191 + operation_expr.hashCode();
hashCode = hashCode * 8191 + ((isSetInsertPartitionExprs()) ? 131071 : 524287);
if (isSetInsertPartitionExprs())
hashCode = hashCode * 8191 + insert_partition_exprs.hashCode();
hashCode = hashCode * 8191 + ((isSetDeletePartitionExprs()) ? 131071 : 524287);
if (isSetDeletePartitionExprs())
hashCode = hashCode * 8191 + delete_partition_exprs.hashCode();
hashCode = hashCode * 8191 + ((insert_random) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetInsertPartitionFields()) ? 131071 : 524287);
if (isSetInsertPartitionFields())
hashCode = hashCode * 8191 + insert_partition_fields.hashCode();
hashCode = hashCode * 8191 + ((isSetPartitionSpecId()) ? 131071 : 524287);
if (isSetPartitionSpecId())
hashCode = hashCode * 8191 + partition_spec_id;
return hashCode;
}
@Override
public int compareTo(TMergePartitionInfo other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetOperationExpr(), other.isSetOperationExpr());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOperationExpr()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operation_expr, other.operation_expr);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetInsertPartitionExprs(), other.isSetInsertPartitionExprs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetInsertPartitionExprs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.insert_partition_exprs, other.insert_partition_exprs);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDeletePartitionExprs(), other.isSetDeletePartitionExprs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDeletePartitionExprs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delete_partition_exprs, other.delete_partition_exprs);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetInsertRandom(), other.isSetInsertRandom());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetInsertRandom()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.insert_random, other.insert_random);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetInsertPartitionFields(), other.isSetInsertPartitionFields());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetInsertPartitionFields()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.insert_partition_fields, other.insert_partition_fields);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPartitionSpecId(), other.isSetPartitionSpecId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPartitionSpecId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partition_spec_id, other.partition_spec_id);
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("TMergePartitionInfo(");
boolean first = true;
sb.append("operation_expr:");
if (this.operation_expr == null) {
sb.append("null");
} else {
sb.append(this.operation_expr);
}
first = false;
if (isSetInsertPartitionExprs()) {
if (!first) sb.append(", ");
sb.append("insert_partition_exprs:");
if (this.insert_partition_exprs == null) {
sb.append("null");
} else {
sb.append(this.insert_partition_exprs);
}
first = false;
}
if (isSetDeletePartitionExprs()) {
if (!first) sb.append(", ");
sb.append("delete_partition_exprs:");
if (this.delete_partition_exprs == null) {
sb.append("null");
} else {
sb.append(this.delete_partition_exprs);
}
first = false;
}
if (!first) sb.append(", ");
sb.append("insert_random:");
sb.append(this.insert_random);
first = false;
if (isSetInsertPartitionFields()) {
if (!first) sb.append(", ");
sb.append("insert_partition_fields:");
if (this.insert_partition_fields == null) {
sb.append("null");
} else {
sb.append(this.insert_partition_fields);
}
first = false;
}
if (isSetPartitionSpecId()) {
if (!first) sb.append(", ");
sb.append("partition_spec_id:");
sb.append(this.partition_spec_id);
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (operation_expr == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'operation_expr' was not present! Struct: " + toString());
}
// alas, we cannot check 'insert_random' because it's a primitive and you chose the non-beans generator.
// check for sub-struct validity
if (operation_expr != null) {
operation_expr.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 TMergePartitionInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TMergePartitionInfoStandardScheme getScheme() {
return new TMergePartitionInfoStandardScheme();
}
}
private static class TMergePartitionInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<TMergePartitionInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TMergePartitionInfo 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: // OPERATION_EXPR
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.operation_expr = new org.apache.doris.thrift.TExpr();
struct.operation_expr.read(iprot);
struct.setOperationExprIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // INSERT_PARTITION_EXPRS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
struct.insert_partition_exprs = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(_list8.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr _elem9;
for (int _i10 = 0; _i10 < _list8.size; ++_i10)
{
_elem9 = new org.apache.doris.thrift.TExpr();
_elem9.read(iprot);
struct.insert_partition_exprs.add(_elem9);
}
iprot.readListEnd();
}
struct.setInsertPartitionExprsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // DELETE_PARTITION_EXPRS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list11 = iprot.readListBegin();
struct.delete_partition_exprs = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(_list11.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr _elem12;
for (int _i13 = 0; _i13 < _list11.size; ++_i13)
{
_elem12 = new org.apache.doris.thrift.TExpr();
_elem12.read(iprot);
struct.delete_partition_exprs.add(_elem12);
}
iprot.readListEnd();
}
struct.setDeletePartitionExprsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // INSERT_RANDOM
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.insert_random = iprot.readBool();
struct.setInsertRandomIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // INSERT_PARTITION_FIELDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list14 = iprot.readListBegin();
struct.insert_partition_fields = new java.util.ArrayList<TIcebergPartitionField>(_list14.size);
@org.apache.thrift.annotation.Nullable TIcebergPartitionField _elem15;
for (int _i16 = 0; _i16 < _list14.size; ++_i16)
{
_elem15 = new TIcebergPartitionField();
_elem15.read(iprot);
struct.insert_partition_fields.add(_elem15);
}
iprot.readListEnd();
}
struct.setInsertPartitionFieldsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // PARTITION_SPEC_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.partition_spec_id = iprot.readI32();
struct.setPartitionSpecIdIsSet(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.isSetInsertRandom()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'insert_random' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TMergePartitionInfo struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.operation_expr != null) {
oprot.writeFieldBegin(OPERATION_EXPR_FIELD_DESC);
struct.operation_expr.write(oprot);
oprot.writeFieldEnd();
}
if (struct.insert_partition_exprs != null) {
if (struct.isSetInsertPartitionExprs()) {
oprot.writeFieldBegin(INSERT_PARTITION_EXPRS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.insert_partition_exprs.size()));
for (org.apache.doris.thrift.TExpr _iter17 : struct.insert_partition_exprs)
{
_iter17.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.delete_partition_exprs != null) {
if (struct.isSetDeletePartitionExprs()) {
oprot.writeFieldBegin(DELETE_PARTITION_EXPRS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.delete_partition_exprs.size()));
for (org.apache.doris.thrift.TExpr _iter18 : struct.delete_partition_exprs)
{
_iter18.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldBegin(INSERT_RANDOM_FIELD_DESC);
oprot.writeBool(struct.insert_random);
oprot.writeFieldEnd();
if (struct.insert_partition_fields != null) {
if (struct.isSetInsertPartitionFields()) {
oprot.writeFieldBegin(INSERT_PARTITION_FIELDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.insert_partition_fields.size()));
for (TIcebergPartitionField _iter19 : struct.insert_partition_fields)
{
_iter19.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.isSetPartitionSpecId()) {
oprot.writeFieldBegin(PARTITION_SPEC_ID_FIELD_DESC);
oprot.writeI32(struct.partition_spec_id);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TMergePartitionInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TMergePartitionInfoTupleScheme getScheme() {
return new TMergePartitionInfoTupleScheme();
}
}
private static class TMergePartitionInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<TMergePartitionInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TMergePartitionInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.operation_expr.write(oprot);
oprot.writeBool(struct.insert_random);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetInsertPartitionExprs()) {
optionals.set(0);
}
if (struct.isSetDeletePartitionExprs()) {
optionals.set(1);
}
if (struct.isSetInsertPartitionFields()) {
optionals.set(2);
}
if (struct.isSetPartitionSpecId()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetInsertPartitionExprs()) {
{
oprot.writeI32(struct.insert_partition_exprs.size());
for (org.apache.doris.thrift.TExpr _iter20 : struct.insert_partition_exprs)
{
_iter20.write(oprot);
}
}
}
if (struct.isSetDeletePartitionExprs()) {
{
oprot.writeI32(struct.delete_partition_exprs.size());
for (org.apache.doris.thrift.TExpr _iter21 : struct.delete_partition_exprs)
{
_iter21.write(oprot);
}
}
}
if (struct.isSetInsertPartitionFields()) {
{
oprot.writeI32(struct.insert_partition_fields.size());
for (TIcebergPartitionField _iter22 : struct.insert_partition_fields)
{
_iter22.write(oprot);
}
}
}
if (struct.isSetPartitionSpecId()) {
oprot.writeI32(struct.partition_spec_id);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TMergePartitionInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.operation_expr = new org.apache.doris.thrift.TExpr();
struct.operation_expr.read(iprot);
struct.setOperationExprIsSet(true);
struct.insert_random = iprot.readBool();
struct.setInsertRandomIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list23 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.insert_partition_exprs = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(_list23.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr _elem24;
for (int _i25 = 0; _i25 < _list23.size; ++_i25)
{
_elem24 = new org.apache.doris.thrift.TExpr();
_elem24.read(iprot);
struct.insert_partition_exprs.add(_elem24);
}
}
struct.setInsertPartitionExprsIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list26 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.delete_partition_exprs = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(_list26.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr _elem27;
for (int _i28 = 0; _i28 < _list26.size; ++_i28)
{
_elem27 = new org.apache.doris.thrift.TExpr();
_elem27.read(iprot);
struct.delete_partition_exprs.add(_elem27);
}
}
struct.setDeletePartitionExprsIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list29 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.insert_partition_fields = new java.util.ArrayList<TIcebergPartitionField>(_list29.size);
@org.apache.thrift.annotation.Nullable TIcebergPartitionField _elem30;
for (int _i31 = 0; _i31 < _list29.size; ++_i31)
{
_elem30 = new TIcebergPartitionField();
_elem30.read(iprot);
struct.insert_partition_fields.add(_elem30);
}
}
struct.setInsertPartitionFieldsIsSet(true);
}
if (incoming.get(3)) {
struct.partition_spec_id = iprot.readI32();
struct.setPartitionSpecIdIsSet(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();
}
}