TQueryColumn.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 TQueryColumn implements org.apache.thrift.TBase<TQueryColumn, TQueryColumn._Fields>, java.io.Serializable, Cloneable, Comparable<TQueryColumn> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TQueryColumn");
private static final org.apache.thrift.protocol.TField CATALOG_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("catalogId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField DB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("dbId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField TBL_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tblId", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("colName", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TQueryColumnStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TQueryColumnTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String catalogId; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String dbId; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String tblId; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String colName; // 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 {
CATALOG_ID((short)1, "catalogId"),
DB_ID((short)2, "dbId"),
TBL_ID((short)3, "tblId"),
COL_NAME((short)4, "colName");
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: // CATALOG_ID
return CATALOG_ID;
case 2: // DB_ID
return DB_ID;
case 3: // TBL_ID
return TBL_ID;
case 4: // COL_NAME
return COL_NAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.CATALOG_ID,_Fields.DB_ID,_Fields.TBL_ID,_Fields.COL_NAME};
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CATALOG_ID, new org.apache.thrift.meta_data.FieldMetaData("catalogId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DB_ID, new org.apache.thrift.meta_data.FieldMetaData("dbId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TBL_ID, new org.apache.thrift.meta_data.FieldMetaData("tblId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("colName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TQueryColumn.class, metaDataMap);
}
public TQueryColumn() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TQueryColumn(TQueryColumn other) {
if (other.isSetCatalogId()) {
this.catalogId = other.catalogId;
}
if (other.isSetDbId()) {
this.dbId = other.dbId;
}
if (other.isSetTblId()) {
this.tblId = other.tblId;
}
if (other.isSetColName()) {
this.colName = other.colName;
}
}
public TQueryColumn deepCopy() {
return new TQueryColumn(this);
}
@Override
public void clear() {
this.catalogId = null;
this.dbId = null;
this.tblId = null;
this.colName = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getCatalogId() {
return this.catalogId;
}
public TQueryColumn setCatalogId(@org.apache.thrift.annotation.Nullable java.lang.String catalogId) {
this.catalogId = catalogId;
return this;
}
public void unsetCatalogId() {
this.catalogId = null;
}
/** Returns true if field catalogId is set (has been assigned a value) and false otherwise */
public boolean isSetCatalogId() {
return this.catalogId != null;
}
public void setCatalogIdIsSet(boolean value) {
if (!value) {
this.catalogId = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDbId() {
return this.dbId;
}
public TQueryColumn setDbId(@org.apache.thrift.annotation.Nullable java.lang.String dbId) {
this.dbId = dbId;
return this;
}
public void unsetDbId() {
this.dbId = null;
}
/** Returns true if field dbId is set (has been assigned a value) and false otherwise */
public boolean isSetDbId() {
return this.dbId != null;
}
public void setDbIdIsSet(boolean value) {
if (!value) {
this.dbId = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getTblId() {
return this.tblId;
}
public TQueryColumn setTblId(@org.apache.thrift.annotation.Nullable java.lang.String tblId) {
this.tblId = tblId;
return this;
}
public void unsetTblId() {
this.tblId = null;
}
/** Returns true if field tblId is set (has been assigned a value) and false otherwise */
public boolean isSetTblId() {
return this.tblId != null;
}
public void setTblIdIsSet(boolean value) {
if (!value) {
this.tblId = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getColName() {
return this.colName;
}
public TQueryColumn setColName(@org.apache.thrift.annotation.Nullable java.lang.String colName) {
this.colName = colName;
return this;
}
public void unsetColName() {
this.colName = null;
}
/** Returns true if field colName is set (has been assigned a value) and false otherwise */
public boolean isSetColName() {
return this.colName != null;
}
public void setColNameIsSet(boolean value) {
if (!value) {
this.colName = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case CATALOG_ID:
if (value == null) {
unsetCatalogId();
} else {
setCatalogId((java.lang.String)value);
}
break;
case DB_ID:
if (value == null) {
unsetDbId();
} else {
setDbId((java.lang.String)value);
}
break;
case TBL_ID:
if (value == null) {
unsetTblId();
} else {
setTblId((java.lang.String)value);
}
break;
case COL_NAME:
if (value == null) {
unsetColName();
} else {
setColName((java.lang.String)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CATALOG_ID:
return getCatalogId();
case DB_ID:
return getDbId();
case TBL_ID:
return getTblId();
case COL_NAME:
return getColName();
}
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 CATALOG_ID:
return isSetCatalogId();
case DB_ID:
return isSetDbId();
case TBL_ID:
return isSetTblId();
case COL_NAME:
return isSetColName();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TQueryColumn)
return this.equals((TQueryColumn)that);
return false;
}
public boolean equals(TQueryColumn that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_catalogId = true && this.isSetCatalogId();
boolean that_present_catalogId = true && that.isSetCatalogId();
if (this_present_catalogId || that_present_catalogId) {
if (!(this_present_catalogId && that_present_catalogId))
return false;
if (!this.catalogId.equals(that.catalogId))
return false;
}
boolean this_present_dbId = true && this.isSetDbId();
boolean that_present_dbId = true && that.isSetDbId();
if (this_present_dbId || that_present_dbId) {
if (!(this_present_dbId && that_present_dbId))
return false;
if (!this.dbId.equals(that.dbId))
return false;
}
boolean this_present_tblId = true && this.isSetTblId();
boolean that_present_tblId = true && that.isSetTblId();
if (this_present_tblId || that_present_tblId) {
if (!(this_present_tblId && that_present_tblId))
return false;
if (!this.tblId.equals(that.tblId))
return false;
}
boolean this_present_colName = true && this.isSetColName();
boolean that_present_colName = true && that.isSetColName();
if (this_present_colName || that_present_colName) {
if (!(this_present_colName && that_present_colName))
return false;
if (!this.colName.equals(that.colName))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetCatalogId()) ? 131071 : 524287);
if (isSetCatalogId())
hashCode = hashCode * 8191 + catalogId.hashCode();
hashCode = hashCode * 8191 + ((isSetDbId()) ? 131071 : 524287);
if (isSetDbId())
hashCode = hashCode * 8191 + dbId.hashCode();
hashCode = hashCode * 8191 + ((isSetTblId()) ? 131071 : 524287);
if (isSetTblId())
hashCode = hashCode * 8191 + tblId.hashCode();
hashCode = hashCode * 8191 + ((isSetColName()) ? 131071 : 524287);
if (isSetColName())
hashCode = hashCode * 8191 + colName.hashCode();
return hashCode;
}
@Override
public int compareTo(TQueryColumn other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetCatalogId(), other.isSetCatalogId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCatalogId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogId, other.catalogId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDbId(), other.isSetDbId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDbId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbId, other.dbId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTblId(), other.isSetTblId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTblId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblId, other.tblId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColName(), other.isSetColName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colName, other.colName);
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("TQueryColumn(");
boolean first = true;
if (isSetCatalogId()) {
sb.append("catalogId:");
if (this.catalogId == null) {
sb.append("null");
} else {
sb.append(this.catalogId);
}
first = false;
}
if (isSetDbId()) {
if (!first) sb.append(", ");
sb.append("dbId:");
if (this.dbId == null) {
sb.append("null");
} else {
sb.append(this.dbId);
}
first = false;
}
if (isSetTblId()) {
if (!first) sb.append(", ");
sb.append("tblId:");
if (this.tblId == null) {
sb.append("null");
} else {
sb.append(this.tblId);
}
first = false;
}
if (isSetColName()) {
if (!first) sb.append(", ");
sb.append("colName:");
if (this.colName == null) {
sb.append("null");
} else {
sb.append(this.colName);
}
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 {
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 TQueryColumnStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TQueryColumnStandardScheme getScheme() {
return new TQueryColumnStandardScheme();
}
}
private static class TQueryColumnStandardScheme extends org.apache.thrift.scheme.StandardScheme<TQueryColumn> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TQueryColumn 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: // CATALOG_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.catalogId = iprot.readString();
struct.setCatalogIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // DB_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.dbId = iprot.readString();
struct.setDbIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // TBL_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tblId = iprot.readString();
struct.setTblIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // COL_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.colName = iprot.readString();
struct.setColNameIsSet(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, TQueryColumn struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.catalogId != null) {
if (struct.isSetCatalogId()) {
oprot.writeFieldBegin(CATALOG_ID_FIELD_DESC);
oprot.writeString(struct.catalogId);
oprot.writeFieldEnd();
}
}
if (struct.dbId != null) {
if (struct.isSetDbId()) {
oprot.writeFieldBegin(DB_ID_FIELD_DESC);
oprot.writeString(struct.dbId);
oprot.writeFieldEnd();
}
}
if (struct.tblId != null) {
if (struct.isSetTblId()) {
oprot.writeFieldBegin(TBL_ID_FIELD_DESC);
oprot.writeString(struct.tblId);
oprot.writeFieldEnd();
}
}
if (struct.colName != null) {
if (struct.isSetColName()) {
oprot.writeFieldBegin(COL_NAME_FIELD_DESC);
oprot.writeString(struct.colName);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TQueryColumnTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TQueryColumnTupleScheme getScheme() {
return new TQueryColumnTupleScheme();
}
}
private static class TQueryColumnTupleScheme extends org.apache.thrift.scheme.TupleScheme<TQueryColumn> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TQueryColumn 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.isSetCatalogId()) {
optionals.set(0);
}
if (struct.isSetDbId()) {
optionals.set(1);
}
if (struct.isSetTblId()) {
optionals.set(2);
}
if (struct.isSetColName()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetCatalogId()) {
oprot.writeString(struct.catalogId);
}
if (struct.isSetDbId()) {
oprot.writeString(struct.dbId);
}
if (struct.isSetTblId()) {
oprot.writeString(struct.tblId);
}
if (struct.isSetColName()) {
oprot.writeString(struct.colName);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TQueryColumn struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.catalogId = iprot.readString();
struct.setCatalogIdIsSet(true);
}
if (incoming.get(1)) {
struct.dbId = iprot.readString();
struct.setDbIdIsSet(true);
}
if (incoming.get(2)) {
struct.tblId = iprot.readString();
struct.setTblIdIsSet(true);
}
if (incoming.get(3)) {
struct.colName = iprot.readString();
struct.setColNameIsSet(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();
}
}