TFullTextSearchParams.java
/**
* Autogenerated by Thrift Compiler (0.24.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"})
public class TFullTextSearchParams implements org.apache.thrift.TBase<TFullTextSearchParams, TFullTextSearchParams._Fields>, java.io.Serializable, Cloneable, Comparable<TFullTextSearchParams> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TFullTextSearchParams");
private static final org.apache.thrift.protocol.TField COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField TOP_K_FIELD_DESC = new org.apache.thrift.protocol.TField("top_k", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.protocol.TField OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("offset", org.apache.thrift.protocol.TType.I64, (short)4);
private static final org.apache.thrift.protocol.TField COVERAGE_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("coverage_mode", org.apache.thrift.protocol.TType.I32, (short)5);
private static final org.apache.thrift.protocol.TField GLOBAL_STATISTICS_FIELD_DESC = new org.apache.thrift.protocol.TField("global_statistics", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.protocol.TField QUERY_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("query_type", org.apache.thrift.protocol.TType.I32, (short)7);
private static final org.apache.thrift.protocol.TField MATCH_OPERATOR_FIELD_DESC = new org.apache.thrift.protocol.TField("match_operator", org.apache.thrift.protocol.TType.I32, (short)8);
private static final org.apache.thrift.protocol.TField MAX_FUZZY_DISTANCE_FIELD_DESC = new org.apache.thrift.protocol.TField("max_fuzzy_distance", org.apache.thrift.protocol.TType.I32, (short)9);
private static final org.apache.thrift.protocol.TField PHRASE_SLOP_FIELD_DESC = new org.apache.thrift.protocol.TField("phrase_slop", org.apache.thrift.protocol.TType.I32, (short)10);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TFullTextSearchParamsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TFullTextSearchParamsTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String column; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String query; // optional
public long top_k; // optional
public long offset; // optional
/**
*
* @see TFtsCoverageMode
*/
public @org.apache.thrift.annotation.Nullable TFtsCoverageMode coverage_mode; // optional
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer global_statistics; // optional
/**
*
* @see TFtsQueryType
*/
public @org.apache.thrift.annotation.Nullable TFtsQueryType query_type; // optional
/**
*
* @see TFtsMatchOperator
*/
public @org.apache.thrift.annotation.Nullable TFtsMatchOperator match_operator; // optional
public int max_fuzzy_distance; // optional
public int phrase_slop; // 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((short)1, "column"),
QUERY((short)2, "query"),
TOP_K((short)3, "top_k"),
OFFSET((short)4, "offset"),
/**
*
* @see TFtsCoverageMode
*/
COVERAGE_MODE((short)5, "coverage_mode"),
GLOBAL_STATISTICS((short)6, "global_statistics"),
/**
*
* @see TFtsQueryType
*/
QUERY_TYPE((short)7, "query_type"),
/**
*
* @see TFtsMatchOperator
*/
MATCH_OPERATOR((short)8, "match_operator"),
MAX_FUZZY_DISTANCE((short)9, "max_fuzzy_distance"),
PHRASE_SLOP((short)10, "phrase_slop");
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
return COLUMN;
case 2: // QUERY
return QUERY;
case 3: // TOP_K
return TOP_K;
case 4: // OFFSET
return OFFSET;
case 5: // COVERAGE_MODE
return COVERAGE_MODE;
case 6: // GLOBAL_STATISTICS
return GLOBAL_STATISTICS;
case 7: // QUERY_TYPE
return QUERY_TYPE;
case 8: // MATCH_OPERATOR
return MATCH_OPERATOR;
case 9: // MAX_FUZZY_DISTANCE
return MAX_FUZZY_DISTANCE;
case 10: // PHRASE_SLOP
return PHRASE_SLOP;
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;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __TOP_K_ISSET_ID = 0;
private static final int __OFFSET_ISSET_ID = 1;
private static final int __MAX_FUZZY_DISTANCE_ISSET_ID = 2;
private static final int __PHRASE_SLOP_ISSET_ID = 3;
private byte __isset_bitfield = 0;
private static final _Fields[] optionals = {_Fields.COLUMN,_Fields.QUERY,_Fields.TOP_K,_Fields.OFFSET,_Fields.COVERAGE_MODE,_Fields.GLOBAL_STATISTICS,_Fields.QUERY_TYPE,_Fields.MATCH_OPERATOR,_Fields.MAX_FUZZY_DISTANCE,_Fields.PHRASE_SLOP};
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, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.QUERY, new org.apache.thrift.meta_data.FieldMetaData("query", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TOP_K, new org.apache.thrift.meta_data.FieldMetaData("top_k", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.OFFSET, new org.apache.thrift.meta_data.FieldMetaData("offset", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.COVERAGE_MODE, new org.apache.thrift.meta_data.FieldMetaData("coverage_mode", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TFtsCoverageMode.class)));
tmpMap.put(_Fields.GLOBAL_STATISTICS, new org.apache.thrift.meta_data.FieldMetaData("global_statistics", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.QUERY_TYPE, new org.apache.thrift.meta_data.FieldMetaData("query_type", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TFtsQueryType.class)));
tmpMap.put(_Fields.MATCH_OPERATOR, new org.apache.thrift.meta_data.FieldMetaData("match_operator", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TFtsMatchOperator.class)));
tmpMap.put(_Fields.MAX_FUZZY_DISTANCE, new org.apache.thrift.meta_data.FieldMetaData("max_fuzzy_distance", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.PHRASE_SLOP, new org.apache.thrift.meta_data.FieldMetaData("phrase_slop", 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(TFullTextSearchParams.class, metaDataMap);
}
public TFullTextSearchParams() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TFullTextSearchParams(TFullTextSearchParams other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetColumn()) {
this.column = other.column;
}
if (other.isSetQuery()) {
this.query = other.query;
}
this.top_k = other.top_k;
this.offset = other.offset;
if (other.isSetCoverageMode()) {
this.coverage_mode = other.coverage_mode;
}
if (other.isSetGlobalStatistics()) {
this.global_statistics = org.apache.thrift.TBaseHelper.copyBinary(other.global_statistics);
}
if (other.isSetQueryType()) {
this.query_type = other.query_type;
}
if (other.isSetMatchOperator()) {
this.match_operator = other.match_operator;
}
this.max_fuzzy_distance = other.max_fuzzy_distance;
this.phrase_slop = other.phrase_slop;
}
@Override
public TFullTextSearchParams deepCopy() {
return new TFullTextSearchParams(this);
}
@Override
public void clear() {
this.column = null;
this.query = null;
setTopKIsSet(false);
this.top_k = 0;
setOffsetIsSet(false);
this.offset = 0;
this.coverage_mode = null;
this.global_statistics = null;
this.query_type = null;
this.match_operator = null;
setMaxFuzzyDistanceIsSet(false);
this.max_fuzzy_distance = 0;
setPhraseSlopIsSet(false);
this.phrase_slop = 0;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getColumn() {
return this.column;
}
public TFullTextSearchParams setColumn(@org.apache.thrift.annotation.Nullable java.lang.String column) {
this.column = column;
return this;
}
public void unsetColumn() {
this.column = null;
}
/** Returns true if field column is set (has been assigned a value) and false otherwise */
public boolean isSetColumn() {
return this.column != null;
}
public void setColumnIsSet(boolean value) {
if (!value) {
this.column = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getQuery() {
return this.query;
}
public TFullTextSearchParams setQuery(@org.apache.thrift.annotation.Nullable java.lang.String query) {
this.query = query;
return this;
}
public void unsetQuery() {
this.query = null;
}
/** Returns true if field query is set (has been assigned a value) and false otherwise */
public boolean isSetQuery() {
return this.query != null;
}
public void setQueryIsSet(boolean value) {
if (!value) {
this.query = null;
}
}
public long getTopK() {
return this.top_k;
}
public TFullTextSearchParams setTopK(long top_k) {
this.top_k = top_k;
setTopKIsSet(true);
return this;
}
public void unsetTopK() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TOP_K_ISSET_ID);
}
/** Returns true if field top_k is set (has been assigned a value) and false otherwise */
public boolean isSetTopK() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TOP_K_ISSET_ID);
}
public void setTopKIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TOP_K_ISSET_ID, value);
}
public long getOffset() {
return this.offset;
}
public TFullTextSearchParams setOffset(long offset) {
this.offset = offset;
setOffsetIsSet(true);
return this;
}
public void unsetOffset() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __OFFSET_ISSET_ID);
}
/** Returns true if field offset is set (has been assigned a value) and false otherwise */
public boolean isSetOffset() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OFFSET_ISSET_ID);
}
public void setOffsetIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OFFSET_ISSET_ID, value);
}
/**
*
* @see TFtsCoverageMode
*/
@org.apache.thrift.annotation.Nullable
public TFtsCoverageMode getCoverageMode() {
return this.coverage_mode;
}
/**
*
* @see TFtsCoverageMode
*/
public TFullTextSearchParams setCoverageMode(@org.apache.thrift.annotation.Nullable TFtsCoverageMode coverage_mode) {
this.coverage_mode = coverage_mode;
return this;
}
public void unsetCoverageMode() {
this.coverage_mode = null;
}
/** Returns true if field coverage_mode is set (has been assigned a value) and false otherwise */
public boolean isSetCoverageMode() {
return this.coverage_mode != null;
}
public void setCoverageModeIsSet(boolean value) {
if (!value) {
this.coverage_mode = null;
}
}
public byte[] getGlobalStatistics() {
setGlobalStatistics(org.apache.thrift.TBaseHelper.rightSize(global_statistics));
return global_statistics == null ? null : global_statistics.array();
}
public java.nio.ByteBuffer bufferForGlobalStatistics() {
return org.apache.thrift.TBaseHelper.copyBinary(global_statistics);
}
public TFullTextSearchParams setGlobalStatistics(byte[] global_statistics) {
this.global_statistics = global_statistics == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(global_statistics.clone());
return this;
}
public TFullTextSearchParams setGlobalStatistics(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer global_statistics) {
this.global_statistics = org.apache.thrift.TBaseHelper.copyBinary(global_statistics);
return this;
}
public void unsetGlobalStatistics() {
this.global_statistics = null;
}
/** Returns true if field global_statistics is set (has been assigned a value) and false otherwise */
public boolean isSetGlobalStatistics() {
return this.global_statistics != null;
}
public void setGlobalStatisticsIsSet(boolean value) {
if (!value) {
this.global_statistics = null;
}
}
/**
*
* @see TFtsQueryType
*/
@org.apache.thrift.annotation.Nullable
public TFtsQueryType getQueryType() {
return this.query_type;
}
/**
*
* @see TFtsQueryType
*/
public TFullTextSearchParams setQueryType(@org.apache.thrift.annotation.Nullable TFtsQueryType query_type) {
this.query_type = query_type;
return this;
}
public void unsetQueryType() {
this.query_type = null;
}
/** Returns true if field query_type is set (has been assigned a value) and false otherwise */
public boolean isSetQueryType() {
return this.query_type != null;
}
public void setQueryTypeIsSet(boolean value) {
if (!value) {
this.query_type = null;
}
}
/**
*
* @see TFtsMatchOperator
*/
@org.apache.thrift.annotation.Nullable
public TFtsMatchOperator getMatchOperator() {
return this.match_operator;
}
/**
*
* @see TFtsMatchOperator
*/
public TFullTextSearchParams setMatchOperator(@org.apache.thrift.annotation.Nullable TFtsMatchOperator match_operator) {
this.match_operator = match_operator;
return this;
}
public void unsetMatchOperator() {
this.match_operator = null;
}
/** Returns true if field match_operator is set (has been assigned a value) and false otherwise */
public boolean isSetMatchOperator() {
return this.match_operator != null;
}
public void setMatchOperatorIsSet(boolean value) {
if (!value) {
this.match_operator = null;
}
}
public int getMaxFuzzyDistance() {
return this.max_fuzzy_distance;
}
public TFullTextSearchParams setMaxFuzzyDistance(int max_fuzzy_distance) {
this.max_fuzzy_distance = max_fuzzy_distance;
setMaxFuzzyDistanceIsSet(true);
return this;
}
public void unsetMaxFuzzyDistance() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAX_FUZZY_DISTANCE_ISSET_ID);
}
/** Returns true if field max_fuzzy_distance is set (has been assigned a value) and false otherwise */
public boolean isSetMaxFuzzyDistance() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAX_FUZZY_DISTANCE_ISSET_ID);
}
public void setMaxFuzzyDistanceIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAX_FUZZY_DISTANCE_ISSET_ID, value);
}
public int getPhraseSlop() {
return this.phrase_slop;
}
public TFullTextSearchParams setPhraseSlop(int phrase_slop) {
this.phrase_slop = phrase_slop;
setPhraseSlopIsSet(true);
return this;
}
public void unsetPhraseSlop() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PHRASE_SLOP_ISSET_ID);
}
/** Returns true if field phrase_slop is set (has been assigned a value) and false otherwise */
public boolean isSetPhraseSlop() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PHRASE_SLOP_ISSET_ID);
}
public void setPhraseSlopIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PHRASE_SLOP_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case COLUMN:
if (value == null) {
unsetColumn();
} else {
setColumn((java.lang.String)value);
}
break;
case QUERY:
if (value == null) {
unsetQuery();
} else {
setQuery((java.lang.String)value);
}
break;
case TOP_K:
if (value == null) {
unsetTopK();
} else {
setTopK((java.lang.Long)value);
}
break;
case OFFSET:
if (value == null) {
unsetOffset();
} else {
setOffset((java.lang.Long)value);
}
break;
case COVERAGE_MODE:
if (value == null) {
unsetCoverageMode();
} else {
setCoverageMode((TFtsCoverageMode)value);
}
break;
case GLOBAL_STATISTICS:
if (value == null) {
unsetGlobalStatistics();
} else {
if (value instanceof byte[]) {
setGlobalStatistics((byte[])value);
} else {
setGlobalStatistics((java.nio.ByteBuffer)value);
}
}
break;
case QUERY_TYPE:
if (value == null) {
unsetQueryType();
} else {
setQueryType((TFtsQueryType)value);
}
break;
case MATCH_OPERATOR:
if (value == null) {
unsetMatchOperator();
} else {
setMatchOperator((TFtsMatchOperator)value);
}
break;
case MAX_FUZZY_DISTANCE:
if (value == null) {
unsetMaxFuzzyDistance();
} else {
setMaxFuzzyDistance((java.lang.Integer)value);
}
break;
case PHRASE_SLOP:
if (value == null) {
unsetPhraseSlop();
} else {
setPhraseSlop((java.lang.Integer)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case COLUMN:
return getColumn();
case QUERY:
return getQuery();
case TOP_K:
return getTopK();
case OFFSET:
return getOffset();
case COVERAGE_MODE:
return getCoverageMode();
case GLOBAL_STATISTICS:
return getGlobalStatistics();
case QUERY_TYPE:
return getQueryType();
case MATCH_OPERATOR:
return getMatchOperator();
case MAX_FUZZY_DISTANCE:
return getMaxFuzzyDistance();
case PHRASE_SLOP:
return getPhraseSlop();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case COLUMN:
return isSetColumn();
case QUERY:
return isSetQuery();
case TOP_K:
return isSetTopK();
case OFFSET:
return isSetOffset();
case COVERAGE_MODE:
return isSetCoverageMode();
case GLOBAL_STATISTICS:
return isSetGlobalStatistics();
case QUERY_TYPE:
return isSetQueryType();
case MATCH_OPERATOR:
return isSetMatchOperator();
case MAX_FUZZY_DISTANCE:
return isSetMaxFuzzyDistance();
case PHRASE_SLOP:
return isSetPhraseSlop();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TFullTextSearchParams)
return this.equals((TFullTextSearchParams)that);
return false;
}
public boolean equals(TFullTextSearchParams that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_column = true && this.isSetColumn();
boolean that_present_column = true && that.isSetColumn();
if (this_present_column || that_present_column) {
if (!(this_present_column && that_present_column))
return false;
if (!this.column.equals(that.column))
return false;
}
boolean this_present_query = true && this.isSetQuery();
boolean that_present_query = true && that.isSetQuery();
if (this_present_query || that_present_query) {
if (!(this_present_query && that_present_query))
return false;
if (!this.query.equals(that.query))
return false;
}
boolean this_present_top_k = true && this.isSetTopK();
boolean that_present_top_k = true && that.isSetTopK();
if (this_present_top_k || that_present_top_k) {
if (!(this_present_top_k && that_present_top_k))
return false;
if (this.top_k != that.top_k)
return false;
}
boolean this_present_offset = true && this.isSetOffset();
boolean that_present_offset = true && that.isSetOffset();
if (this_present_offset || that_present_offset) {
if (!(this_present_offset && that_present_offset))
return false;
if (this.offset != that.offset)
return false;
}
boolean this_present_coverage_mode = true && this.isSetCoverageMode();
boolean that_present_coverage_mode = true && that.isSetCoverageMode();
if (this_present_coverage_mode || that_present_coverage_mode) {
if (!(this_present_coverage_mode && that_present_coverage_mode))
return false;
if (!this.coverage_mode.equals(that.coverage_mode))
return false;
}
boolean this_present_global_statistics = true && this.isSetGlobalStatistics();
boolean that_present_global_statistics = true && that.isSetGlobalStatistics();
if (this_present_global_statistics || that_present_global_statistics) {
if (!(this_present_global_statistics && that_present_global_statistics))
return false;
if (!this.global_statistics.equals(that.global_statistics))
return false;
}
boolean this_present_query_type = true && this.isSetQueryType();
boolean that_present_query_type = true && that.isSetQueryType();
if (this_present_query_type || that_present_query_type) {
if (!(this_present_query_type && that_present_query_type))
return false;
if (!this.query_type.equals(that.query_type))
return false;
}
boolean this_present_match_operator = true && this.isSetMatchOperator();
boolean that_present_match_operator = true && that.isSetMatchOperator();
if (this_present_match_operator || that_present_match_operator) {
if (!(this_present_match_operator && that_present_match_operator))
return false;
if (!this.match_operator.equals(that.match_operator))
return false;
}
boolean this_present_max_fuzzy_distance = true && this.isSetMaxFuzzyDistance();
boolean that_present_max_fuzzy_distance = true && that.isSetMaxFuzzyDistance();
if (this_present_max_fuzzy_distance || that_present_max_fuzzy_distance) {
if (!(this_present_max_fuzzy_distance && that_present_max_fuzzy_distance))
return false;
if (this.max_fuzzy_distance != that.max_fuzzy_distance)
return false;
}
boolean this_present_phrase_slop = true && this.isSetPhraseSlop();
boolean that_present_phrase_slop = true && that.isSetPhraseSlop();
if (this_present_phrase_slop || that_present_phrase_slop) {
if (!(this_present_phrase_slop && that_present_phrase_slop))
return false;
if (this.phrase_slop != that.phrase_slop)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetColumn()) ? 131071 : 524287);
if (isSetColumn())
hashCode = hashCode * 8191 + column.hashCode();
hashCode = hashCode * 8191 + ((isSetQuery()) ? 131071 : 524287);
if (isSetQuery())
hashCode = hashCode * 8191 + query.hashCode();
hashCode = hashCode * 8191 + ((isSetTopK()) ? 131071 : 524287);
if (isSetTopK())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(top_k);
hashCode = hashCode * 8191 + ((isSetOffset()) ? 131071 : 524287);
if (isSetOffset())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(offset);
hashCode = hashCode * 8191 + ((isSetCoverageMode()) ? 131071 : 524287);
if (isSetCoverageMode())
hashCode = hashCode * 8191 + coverage_mode.getValue();
hashCode = hashCode * 8191 + ((isSetGlobalStatistics()) ? 131071 : 524287);
if (isSetGlobalStatistics())
hashCode = hashCode * 8191 + global_statistics.hashCode();
hashCode = hashCode * 8191 + ((isSetQueryType()) ? 131071 : 524287);
if (isSetQueryType())
hashCode = hashCode * 8191 + query_type.getValue();
hashCode = hashCode * 8191 + ((isSetMatchOperator()) ? 131071 : 524287);
if (isSetMatchOperator())
hashCode = hashCode * 8191 + match_operator.getValue();
hashCode = hashCode * 8191 + ((isSetMaxFuzzyDistance()) ? 131071 : 524287);
if (isSetMaxFuzzyDistance())
hashCode = hashCode * 8191 + max_fuzzy_distance;
hashCode = hashCode * 8191 + ((isSetPhraseSlop()) ? 131071 : 524287);
if (isSetPhraseSlop())
hashCode = hashCode * 8191 + phrase_slop;
return hashCode;
}
@Override
public int compareTo(TFullTextSearchParams other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetColumn(), other.isSetColumn());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumn()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, other.column);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetQuery(), other.isSetQuery());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQuery()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query, other.query);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTopK(), other.isSetTopK());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTopK()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.top_k, other.top_k);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetOffset(), other.isSetOffset());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOffset()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.offset, other.offset);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCoverageMode(), other.isSetCoverageMode());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCoverageMode()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.coverage_mode, other.coverage_mode);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetGlobalStatistics(), other.isSetGlobalStatistics());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGlobalStatistics()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.global_statistics, other.global_statistics);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetQueryType(), other.isSetQueryType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQueryType()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query_type, other.query_type);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMatchOperator(), other.isSetMatchOperator());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMatchOperator()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.match_operator, other.match_operator);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMaxFuzzyDistance(), other.isSetMaxFuzzyDistance());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMaxFuzzyDistance()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_fuzzy_distance, other.max_fuzzy_distance);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPhraseSlop(), other.isSetPhraseSlop());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPhraseSlop()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.phrase_slop, other.phrase_slop);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
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("TFullTextSearchParams(");
boolean first = true;
if (isSetColumn()) {
sb.append("column:");
if (this.column == null) {
sb.append("null");
} else {
sb.append(this.column);
}
first = false;
}
if (isSetQuery()) {
if (!first) sb.append(", ");
sb.append("query:");
if (this.query == null) {
sb.append("null");
} else {
sb.append(this.query);
}
first = false;
}
if (isSetTopK()) {
if (!first) sb.append(", ");
sb.append("top_k:");
sb.append(this.top_k);
first = false;
}
if (isSetOffset()) {
if (!first) sb.append(", ");
sb.append("offset:");
sb.append(this.offset);
first = false;
}
if (isSetCoverageMode()) {
if (!first) sb.append(", ");
sb.append("coverage_mode:");
if (this.coverage_mode == null) {
sb.append("null");
} else {
sb.append(this.coverage_mode);
}
first = false;
}
if (isSetGlobalStatistics()) {
if (!first) sb.append(", ");
sb.append("global_statistics:");
if (this.global_statistics == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.global_statistics, sb);
}
first = false;
}
if (isSetQueryType()) {
if (!first) sb.append(", ");
sb.append("query_type:");
if (this.query_type == null) {
sb.append("null");
} else {
sb.append(this.query_type);
}
first = false;
}
if (isSetMatchOperator()) {
if (!first) sb.append(", ");
sb.append("match_operator:");
if (this.match_operator == null) {
sb.append("null");
} else {
sb.append(this.match_operator);
}
first = false;
}
if (isSetMaxFuzzyDistance()) {
if (!first) sb.append(", ");
sb.append("max_fuzzy_distance:");
sb.append(this.max_fuzzy_distance);
first = false;
}
if (isSetPhraseSlop()) {
if (!first) sb.append(", ");
sb.append("phrase_slop:");
sb.append(this.phrase_slop);
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// 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 TFullTextSearchParamsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public TFullTextSearchParamsStandardScheme getScheme() {
return new TFullTextSearchParamsStandardScheme();
}
}
private static class TFullTextSearchParamsStandardScheme extends org.apache.thrift.scheme.StandardScheme<TFullTextSearchParams> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, TFullTextSearchParams struct) throws org.apache.thrift.TException {
iprot.incrementRecursionDepth();
try {
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
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.column = iprot.readString();
struct.setColumnIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // QUERY
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.query = iprot.readString();
struct.setQueryIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // TOP_K
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.top_k = iprot.readI64();
struct.setTopKIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // OFFSET
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.offset = iprot.readI64();
struct.setOffsetIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // COVERAGE_MODE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.coverage_mode = org.apache.doris.thrift.TFtsCoverageMode.findByValue(iprot.readI32());
struct.setCoverageModeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // GLOBAL_STATISTICS
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.global_statistics = iprot.readBinary();
struct.setGlobalStatisticsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // QUERY_TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.query_type = org.apache.doris.thrift.TFtsQueryType.findByValue(iprot.readI32());
struct.setQueryTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // MATCH_OPERATOR
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.match_operator = org.apache.doris.thrift.TFtsMatchOperator.findByValue(iprot.readI32());
struct.setMatchOperatorIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // MAX_FUZZY_DISTANCE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.max_fuzzy_distance = iprot.readI32();
struct.setMaxFuzzyDistanceIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // PHRASE_SLOP
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.phrase_slop = iprot.readI32();
struct.setPhraseSlopIsSet(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();
} finally {
iprot.decrementRecursionDepth();
}
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, TFullTextSearchParams struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.column != null) {
if (struct.isSetColumn()) {
oprot.writeFieldBegin(COLUMN_FIELD_DESC);
oprot.writeString(struct.column);
oprot.writeFieldEnd();
}
}
if (struct.query != null) {
if (struct.isSetQuery()) {
oprot.writeFieldBegin(QUERY_FIELD_DESC);
oprot.writeString(struct.query);
oprot.writeFieldEnd();
}
}
if (struct.isSetTopK()) {
oprot.writeFieldBegin(TOP_K_FIELD_DESC);
oprot.writeI64(struct.top_k);
oprot.writeFieldEnd();
}
if (struct.isSetOffset()) {
oprot.writeFieldBegin(OFFSET_FIELD_DESC);
oprot.writeI64(struct.offset);
oprot.writeFieldEnd();
}
if (struct.coverage_mode != null) {
if (struct.isSetCoverageMode()) {
oprot.writeFieldBegin(COVERAGE_MODE_FIELD_DESC);
oprot.writeI32(struct.coverage_mode.getValue());
oprot.writeFieldEnd();
}
}
if (struct.global_statistics != null) {
if (struct.isSetGlobalStatistics()) {
oprot.writeFieldBegin(GLOBAL_STATISTICS_FIELD_DESC);
oprot.writeBinary(struct.global_statistics);
oprot.writeFieldEnd();
}
}
if (struct.query_type != null) {
if (struct.isSetQueryType()) {
oprot.writeFieldBegin(QUERY_TYPE_FIELD_DESC);
oprot.writeI32(struct.query_type.getValue());
oprot.writeFieldEnd();
}
}
if (struct.match_operator != null) {
if (struct.isSetMatchOperator()) {
oprot.writeFieldBegin(MATCH_OPERATOR_FIELD_DESC);
oprot.writeI32(struct.match_operator.getValue());
oprot.writeFieldEnd();
}
}
if (struct.isSetMaxFuzzyDistance()) {
oprot.writeFieldBegin(MAX_FUZZY_DISTANCE_FIELD_DESC);
oprot.writeI32(struct.max_fuzzy_distance);
oprot.writeFieldEnd();
}
if (struct.isSetPhraseSlop()) {
oprot.writeFieldBegin(PHRASE_SLOP_FIELD_DESC);
oprot.writeI32(struct.phrase_slop);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TFullTextSearchParamsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public TFullTextSearchParamsTupleScheme getScheme() {
return new TFullTextSearchParamsTupleScheme();
}
}
private static class TFullTextSearchParamsTupleScheme extends org.apache.thrift.scheme.TupleScheme<TFullTextSearchParams> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TFullTextSearchParams struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetColumn()) {
optionals.set(0);
}
if (struct.isSetQuery()) {
optionals.set(1);
}
if (struct.isSetTopK()) {
optionals.set(2);
}
if (struct.isSetOffset()) {
optionals.set(3);
}
if (struct.isSetCoverageMode()) {
optionals.set(4);
}
if (struct.isSetGlobalStatistics()) {
optionals.set(5);
}
if (struct.isSetQueryType()) {
optionals.set(6);
}
if (struct.isSetMatchOperator()) {
optionals.set(7);
}
if (struct.isSetMaxFuzzyDistance()) {
optionals.set(8);
}
if (struct.isSetPhraseSlop()) {
optionals.set(9);
}
oprot.writeBitSet(optionals, 10);
if (struct.isSetColumn()) {
oprot.writeString(struct.column);
}
if (struct.isSetQuery()) {
oprot.writeString(struct.query);
}
if (struct.isSetTopK()) {
oprot.writeI64(struct.top_k);
}
if (struct.isSetOffset()) {
oprot.writeI64(struct.offset);
}
if (struct.isSetCoverageMode()) {
oprot.writeI32(struct.coverage_mode.getValue());
}
if (struct.isSetGlobalStatistics()) {
oprot.writeBinary(struct.global_statistics);
}
if (struct.isSetQueryType()) {
oprot.writeI32(struct.query_type.getValue());
}
if (struct.isSetMatchOperator()) {
oprot.writeI32(struct.match_operator.getValue());
}
if (struct.isSetMaxFuzzyDistance()) {
oprot.writeI32(struct.max_fuzzy_distance);
}
if (struct.isSetPhraseSlop()) {
oprot.writeI32(struct.phrase_slop);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TFullTextSearchParams struct) throws org.apache.thrift.TException {
prot.incrementRecursionDepth();
try {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(10);
if (incoming.get(0)) {
struct.column = iprot.readString();
struct.setColumnIsSet(true);
}
if (incoming.get(1)) {
struct.query = iprot.readString();
struct.setQueryIsSet(true);
}
if (incoming.get(2)) {
struct.top_k = iprot.readI64();
struct.setTopKIsSet(true);
}
if (incoming.get(3)) {
struct.offset = iprot.readI64();
struct.setOffsetIsSet(true);
}
if (incoming.get(4)) {
struct.coverage_mode = org.apache.doris.thrift.TFtsCoverageMode.findByValue(iprot.readI32());
struct.setCoverageModeIsSet(true);
}
if (incoming.get(5)) {
struct.global_statistics = iprot.readBinary();
struct.setGlobalStatisticsIsSet(true);
}
if (incoming.get(6)) {
struct.query_type = org.apache.doris.thrift.TFtsQueryType.findByValue(iprot.readI32());
struct.setQueryTypeIsSet(true);
}
if (incoming.get(7)) {
struct.match_operator = org.apache.doris.thrift.TFtsMatchOperator.findByValue(iprot.readI32());
struct.setMatchOperatorIsSet(true);
}
if (incoming.get(8)) {
struct.max_fuzzy_distance = iprot.readI32();
struct.setMaxFuzzyDistanceIsSet(true);
}
if (incoming.get(9)) {
struct.phrase_slop = iprot.readI32();
struct.setPhraseSlopIsSet(true);
}
} finally {
prot.decrementRecursionDepth();
}
}
}
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();
}
}