TCondition.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 TCondition implements org.apache.thrift.TBase<TCondition, TCondition._Fields>, java.io.Serializable, Cloneable, Comparable<TCondition> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCondition");
private static final org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("column_name", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField CONDITION_OP_FIELD_DESC = new org.apache.thrift.protocol.TField("condition_op", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField CONDITION_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("condition_values", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField COLUMN_UNIQUE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("column_unique_id", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField MARKED_BY_RUNTIME_FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("marked_by_runtime_filter", org.apache.thrift.protocol.TType.BOOL, (short)5);
private static final org.apache.thrift.protocol.TField COMPOUND_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("compound_type", org.apache.thrift.protocol.TType.I32, (short)1000);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TConditionStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TConditionTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String column_name; // required
public @org.apache.thrift.annotation.Nullable java.lang.String condition_op; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> condition_values; // required
public int column_unique_id; // optional
public boolean marked_by_runtime_filter; // optional
/**
*
* @see TCompoundType
*/
public @org.apache.thrift.annotation.Nullable TCompoundType compound_type; // 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 {
COLUMN_NAME((short)1, "column_name"),
CONDITION_OP((short)2, "condition_op"),
CONDITION_VALUES((short)3, "condition_values"),
COLUMN_UNIQUE_ID((short)4, "column_unique_id"),
MARKED_BY_RUNTIME_FILTER((short)5, "marked_by_runtime_filter"),
/**
*
* @see TCompoundType
*/
COMPOUND_TYPE((short)1000, "compound_type");
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: // COLUMN_NAME
return COLUMN_NAME;
case 2: // CONDITION_OP
return CONDITION_OP;
case 3: // CONDITION_VALUES
return CONDITION_VALUES;
case 4: // COLUMN_UNIQUE_ID
return COLUMN_UNIQUE_ID;
case 5: // MARKED_BY_RUNTIME_FILTER
return MARKED_BY_RUNTIME_FILTER;
case 1000: // COMPOUND_TYPE
return COMPOUND_TYPE;
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 __COLUMN_UNIQUE_ID_ISSET_ID = 0;
private static final int __MARKED_BY_RUNTIME_FILTER_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.COLUMN_UNIQUE_ID,_Fields.MARKED_BY_RUNTIME_FILTER,_Fields.COMPOUND_TYPE};
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.COLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("column_name", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.CONDITION_OP, new org.apache.thrift.meta_data.FieldMetaData("condition_op", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.CONDITION_VALUES, new org.apache.thrift.meta_data.FieldMetaData("condition_values", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.COLUMN_UNIQUE_ID, new org.apache.thrift.meta_data.FieldMetaData("column_unique_id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.MARKED_BY_RUNTIME_FILTER, new org.apache.thrift.meta_data.FieldMetaData("marked_by_runtime_filter", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.COMPOUND_TYPE, new org.apache.thrift.meta_data.FieldMetaData("compound_type", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TCompoundType.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCondition.class, metaDataMap);
}
public TCondition() {
this.marked_by_runtime_filter = false;
this.compound_type = org.apache.doris.thrift.TCompoundType.UNKNOWN;
}
public TCondition(
java.lang.String column_name,
java.lang.String condition_op,
java.util.List<java.lang.String> condition_values)
{
this();
this.column_name = column_name;
this.condition_op = condition_op;
this.condition_values = condition_values;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TCondition(TCondition other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetColumnName()) {
this.column_name = other.column_name;
}
if (other.isSetConditionOp()) {
this.condition_op = other.condition_op;
}
if (other.isSetConditionValues()) {
java.util.List<java.lang.String> __this__condition_values = new java.util.ArrayList<java.lang.String>(other.condition_values);
this.condition_values = __this__condition_values;
}
this.column_unique_id = other.column_unique_id;
this.marked_by_runtime_filter = other.marked_by_runtime_filter;
if (other.isSetCompoundType()) {
this.compound_type = other.compound_type;
}
}
public TCondition deepCopy() {
return new TCondition(this);
}
@Override
public void clear() {
this.column_name = null;
this.condition_op = null;
this.condition_values = null;
setColumnUniqueIdIsSet(false);
this.column_unique_id = 0;
this.marked_by_runtime_filter = false;
this.compound_type = org.apache.doris.thrift.TCompoundType.UNKNOWN;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getColumnName() {
return this.column_name;
}
public TCondition setColumnName(@org.apache.thrift.annotation.Nullable java.lang.String column_name) {
this.column_name = column_name;
return this;
}
public void unsetColumnName() {
this.column_name = null;
}
/** Returns true if field column_name is set (has been assigned a value) and false otherwise */
public boolean isSetColumnName() {
return this.column_name != null;
}
public void setColumnNameIsSet(boolean value) {
if (!value) {
this.column_name = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getConditionOp() {
return this.condition_op;
}
public TCondition setConditionOp(@org.apache.thrift.annotation.Nullable java.lang.String condition_op) {
this.condition_op = condition_op;
return this;
}
public void unsetConditionOp() {
this.condition_op = null;
}
/** Returns true if field condition_op is set (has been assigned a value) and false otherwise */
public boolean isSetConditionOp() {
return this.condition_op != null;
}
public void setConditionOpIsSet(boolean value) {
if (!value) {
this.condition_op = null;
}
}
public int getConditionValuesSize() {
return (this.condition_values == null) ? 0 : this.condition_values.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.String> getConditionValuesIterator() {
return (this.condition_values == null) ? null : this.condition_values.iterator();
}
public void addToConditionValues(java.lang.String elem) {
if (this.condition_values == null) {
this.condition_values = new java.util.ArrayList<java.lang.String>();
}
this.condition_values.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.String> getConditionValues() {
return this.condition_values;
}
public TCondition setConditionValues(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> condition_values) {
this.condition_values = condition_values;
return this;
}
public void unsetConditionValues() {
this.condition_values = null;
}
/** Returns true if field condition_values is set (has been assigned a value) and false otherwise */
public boolean isSetConditionValues() {
return this.condition_values != null;
}
public void setConditionValuesIsSet(boolean value) {
if (!value) {
this.condition_values = null;
}
}
public int getColumnUniqueId() {
return this.column_unique_id;
}
public TCondition setColumnUniqueId(int column_unique_id) {
this.column_unique_id = column_unique_id;
setColumnUniqueIdIsSet(true);
return this;
}
public void unsetColumnUniqueId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMN_UNIQUE_ID_ISSET_ID);
}
/** Returns true if field column_unique_id is set (has been assigned a value) and false otherwise */
public boolean isSetColumnUniqueId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMN_UNIQUE_ID_ISSET_ID);
}
public void setColumnUniqueIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMN_UNIQUE_ID_ISSET_ID, value);
}
public boolean isMarkedByRuntimeFilter() {
return this.marked_by_runtime_filter;
}
public TCondition setMarkedByRuntimeFilter(boolean marked_by_runtime_filter) {
this.marked_by_runtime_filter = marked_by_runtime_filter;
setMarkedByRuntimeFilterIsSet(true);
return this;
}
public void unsetMarkedByRuntimeFilter() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MARKED_BY_RUNTIME_FILTER_ISSET_ID);
}
/** Returns true if field marked_by_runtime_filter is set (has been assigned a value) and false otherwise */
public boolean isSetMarkedByRuntimeFilter() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MARKED_BY_RUNTIME_FILTER_ISSET_ID);
}
public void setMarkedByRuntimeFilterIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MARKED_BY_RUNTIME_FILTER_ISSET_ID, value);
}
/**
*
* @see TCompoundType
*/
@org.apache.thrift.annotation.Nullable
public TCompoundType getCompoundType() {
return this.compound_type;
}
/**
*
* @see TCompoundType
*/
public TCondition setCompoundType(@org.apache.thrift.annotation.Nullable TCompoundType compound_type) {
this.compound_type = compound_type;
return this;
}
public void unsetCompoundType() {
this.compound_type = null;
}
/** Returns true if field compound_type is set (has been assigned a value) and false otherwise */
public boolean isSetCompoundType() {
return this.compound_type != null;
}
public void setCompoundTypeIsSet(boolean value) {
if (!value) {
this.compound_type = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case COLUMN_NAME:
if (value == null) {
unsetColumnName();
} else {
setColumnName((java.lang.String)value);
}
break;
case CONDITION_OP:
if (value == null) {
unsetConditionOp();
} else {
setConditionOp((java.lang.String)value);
}
break;
case CONDITION_VALUES:
if (value == null) {
unsetConditionValues();
} else {
setConditionValues((java.util.List<java.lang.String>)value);
}
break;
case COLUMN_UNIQUE_ID:
if (value == null) {
unsetColumnUniqueId();
} else {
setColumnUniqueId((java.lang.Integer)value);
}
break;
case MARKED_BY_RUNTIME_FILTER:
if (value == null) {
unsetMarkedByRuntimeFilter();
} else {
setMarkedByRuntimeFilter((java.lang.Boolean)value);
}
break;
case COMPOUND_TYPE:
if (value == null) {
unsetCompoundType();
} else {
setCompoundType((TCompoundType)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case COLUMN_NAME:
return getColumnName();
case CONDITION_OP:
return getConditionOp();
case CONDITION_VALUES:
return getConditionValues();
case COLUMN_UNIQUE_ID:
return getColumnUniqueId();
case MARKED_BY_RUNTIME_FILTER:
return isMarkedByRuntimeFilter();
case COMPOUND_TYPE:
return getCompoundType();
}
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 COLUMN_NAME:
return isSetColumnName();
case CONDITION_OP:
return isSetConditionOp();
case CONDITION_VALUES:
return isSetConditionValues();
case COLUMN_UNIQUE_ID:
return isSetColumnUniqueId();
case MARKED_BY_RUNTIME_FILTER:
return isSetMarkedByRuntimeFilter();
case COMPOUND_TYPE:
return isSetCompoundType();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TCondition)
return this.equals((TCondition)that);
return false;
}
public boolean equals(TCondition that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_column_name = true && this.isSetColumnName();
boolean that_present_column_name = true && that.isSetColumnName();
if (this_present_column_name || that_present_column_name) {
if (!(this_present_column_name && that_present_column_name))
return false;
if (!this.column_name.equals(that.column_name))
return false;
}
boolean this_present_condition_op = true && this.isSetConditionOp();
boolean that_present_condition_op = true && that.isSetConditionOp();
if (this_present_condition_op || that_present_condition_op) {
if (!(this_present_condition_op && that_present_condition_op))
return false;
if (!this.condition_op.equals(that.condition_op))
return false;
}
boolean this_present_condition_values = true && this.isSetConditionValues();
boolean that_present_condition_values = true && that.isSetConditionValues();
if (this_present_condition_values || that_present_condition_values) {
if (!(this_present_condition_values && that_present_condition_values))
return false;
if (!this.condition_values.equals(that.condition_values))
return false;
}
boolean this_present_column_unique_id = true && this.isSetColumnUniqueId();
boolean that_present_column_unique_id = true && that.isSetColumnUniqueId();
if (this_present_column_unique_id || that_present_column_unique_id) {
if (!(this_present_column_unique_id && that_present_column_unique_id))
return false;
if (this.column_unique_id != that.column_unique_id)
return false;
}
boolean this_present_marked_by_runtime_filter = true && this.isSetMarkedByRuntimeFilter();
boolean that_present_marked_by_runtime_filter = true && that.isSetMarkedByRuntimeFilter();
if (this_present_marked_by_runtime_filter || that_present_marked_by_runtime_filter) {
if (!(this_present_marked_by_runtime_filter && that_present_marked_by_runtime_filter))
return false;
if (this.marked_by_runtime_filter != that.marked_by_runtime_filter)
return false;
}
boolean this_present_compound_type = true && this.isSetCompoundType();
boolean that_present_compound_type = true && that.isSetCompoundType();
if (this_present_compound_type || that_present_compound_type) {
if (!(this_present_compound_type && that_present_compound_type))
return false;
if (!this.compound_type.equals(that.compound_type))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetColumnName()) ? 131071 : 524287);
if (isSetColumnName())
hashCode = hashCode * 8191 + column_name.hashCode();
hashCode = hashCode * 8191 + ((isSetConditionOp()) ? 131071 : 524287);
if (isSetConditionOp())
hashCode = hashCode * 8191 + condition_op.hashCode();
hashCode = hashCode * 8191 + ((isSetConditionValues()) ? 131071 : 524287);
if (isSetConditionValues())
hashCode = hashCode * 8191 + condition_values.hashCode();
hashCode = hashCode * 8191 + ((isSetColumnUniqueId()) ? 131071 : 524287);
if (isSetColumnUniqueId())
hashCode = hashCode * 8191 + column_unique_id;
hashCode = hashCode * 8191 + ((isSetMarkedByRuntimeFilter()) ? 131071 : 524287);
if (isSetMarkedByRuntimeFilter())
hashCode = hashCode * 8191 + ((marked_by_runtime_filter) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetCompoundType()) ? 131071 : 524287);
if (isSetCompoundType())
hashCode = hashCode * 8191 + compound_type.getValue();
return hashCode;
}
@Override
public int compareTo(TCondition other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetColumnName(), other.isSetColumnName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_name, other.column_name);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetConditionOp(), other.isSetConditionOp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetConditionOp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.condition_op, other.condition_op);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetConditionValues(), other.isSetConditionValues());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetConditionValues()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.condition_values, other.condition_values);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnUniqueId(), other.isSetColumnUniqueId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnUniqueId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_unique_id, other.column_unique_id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMarkedByRuntimeFilter(), other.isSetMarkedByRuntimeFilter());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMarkedByRuntimeFilter()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.marked_by_runtime_filter, other.marked_by_runtime_filter);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCompoundType(), other.isSetCompoundType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCompoundType()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compound_type, other.compound_type);
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("TCondition(");
boolean first = true;
sb.append("column_name:");
if (this.column_name == null) {
sb.append("null");
} else {
sb.append(this.column_name);
}
first = false;
if (!first) sb.append(", ");
sb.append("condition_op:");
if (this.condition_op == null) {
sb.append("null");
} else {
sb.append(this.condition_op);
}
first = false;
if (!first) sb.append(", ");
sb.append("condition_values:");
if (this.condition_values == null) {
sb.append("null");
} else {
sb.append(this.condition_values);
}
first = false;
if (isSetColumnUniqueId()) {
if (!first) sb.append(", ");
sb.append("column_unique_id:");
sb.append(this.column_unique_id);
first = false;
}
if (isSetMarkedByRuntimeFilter()) {
if (!first) sb.append(", ");
sb.append("marked_by_runtime_filter:");
sb.append(this.marked_by_runtime_filter);
first = false;
}
if (isSetCompoundType()) {
if (!first) sb.append(", ");
sb.append("compound_type:");
if (this.compound_type == null) {
sb.append("null");
} else {
sb.append(this.compound_type);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (column_name == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'column_name' was not present! Struct: " + toString());
}
if (condition_op == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'condition_op' was not present! Struct: " + toString());
}
if (condition_values == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'condition_values' 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 TConditionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TConditionStandardScheme getScheme() {
return new TConditionStandardScheme();
}
}
private static class TConditionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TCondition> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TCondition 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: // COLUMN_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.column_name = iprot.readString();
struct.setColumnNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // CONDITION_OP
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.condition_op = iprot.readString();
struct.setConditionOpIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // CONDITION_VALUES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list148 = iprot.readListBegin();
struct.condition_values = new java.util.ArrayList<java.lang.String>(_list148.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem149;
for (int _i150 = 0; _i150 < _list148.size; ++_i150)
{
_elem149 = iprot.readString();
struct.condition_values.add(_elem149);
}
iprot.readListEnd();
}
struct.setConditionValuesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // COLUMN_UNIQUE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.column_unique_id = iprot.readI32();
struct.setColumnUniqueIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // MARKED_BY_RUNTIME_FILTER
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.marked_by_runtime_filter = iprot.readBool();
struct.setMarkedByRuntimeFilterIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1000: // COMPOUND_TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.compound_type = org.apache.doris.thrift.TCompoundType.findByValue(iprot.readI32());
struct.setCompoundTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TCondition struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.column_name != null) {
oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC);
oprot.writeString(struct.column_name);
oprot.writeFieldEnd();
}
if (struct.condition_op != null) {
oprot.writeFieldBegin(CONDITION_OP_FIELD_DESC);
oprot.writeString(struct.condition_op);
oprot.writeFieldEnd();
}
if (struct.condition_values != null) {
oprot.writeFieldBegin(CONDITION_VALUES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.condition_values.size()));
for (java.lang.String _iter151 : struct.condition_values)
{
oprot.writeString(_iter151);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.isSetColumnUniqueId()) {
oprot.writeFieldBegin(COLUMN_UNIQUE_ID_FIELD_DESC);
oprot.writeI32(struct.column_unique_id);
oprot.writeFieldEnd();
}
if (struct.isSetMarkedByRuntimeFilter()) {
oprot.writeFieldBegin(MARKED_BY_RUNTIME_FILTER_FIELD_DESC);
oprot.writeBool(struct.marked_by_runtime_filter);
oprot.writeFieldEnd();
}
if (struct.compound_type != null) {
if (struct.isSetCompoundType()) {
oprot.writeFieldBegin(COMPOUND_TYPE_FIELD_DESC);
oprot.writeI32(struct.compound_type.getValue());
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TConditionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TConditionTupleScheme getScheme() {
return new TConditionTupleScheme();
}
}
private static class TConditionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TCondition> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TCondition struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.column_name);
oprot.writeString(struct.condition_op);
{
oprot.writeI32(struct.condition_values.size());
for (java.lang.String _iter152 : struct.condition_values)
{
oprot.writeString(_iter152);
}
}
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetColumnUniqueId()) {
optionals.set(0);
}
if (struct.isSetMarkedByRuntimeFilter()) {
optionals.set(1);
}
if (struct.isSetCompoundType()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetColumnUniqueId()) {
oprot.writeI32(struct.column_unique_id);
}
if (struct.isSetMarkedByRuntimeFilter()) {
oprot.writeBool(struct.marked_by_runtime_filter);
}
if (struct.isSetCompoundType()) {
oprot.writeI32(struct.compound_type.getValue());
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TCondition struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.column_name = iprot.readString();
struct.setColumnNameIsSet(true);
struct.condition_op = iprot.readString();
struct.setConditionOpIsSet(true);
{
org.apache.thrift.protocol.TList _list153 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.condition_values = new java.util.ArrayList<java.lang.String>(_list153.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem154;
for (int _i155 = 0; _i155 < _list153.size; ++_i155)
{
_elem154 = iprot.readString();
struct.condition_values.add(_elem154);
}
}
struct.setConditionValuesIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.column_unique_id = iprot.readI32();
struct.setColumnUniqueIdIsSet(true);
}
if (incoming.get(1)) {
struct.marked_by_runtime_filter = iprot.readBool();
struct.setMarkedByRuntimeFilterIsSet(true);
}
if (incoming.get(2)) {
struct.compound_type = org.apache.doris.thrift.TCompoundType.findByValue(iprot.readI32());
struct.setCompoundTypeIsSet(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();
}
}