TField.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.schema.external;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)", date = "2026-05-14")
public class TField implements org.apache.thrift.TBase<TField, TField._Fields>, java.io.Serializable, Cloneable, Comparable<TField> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TField");
private static final org.apache.thrift.protocol.TField IS_OPTIONAL_FIELD_DESC = new org.apache.thrift.protocol.TField("is_optional", org.apache.thrift.protocol.TType.BOOL, (short)1);
private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRUCT, (short)4);
private static final org.apache.thrift.protocol.TField NESTED_FIELD_FIELD_DESC = new org.apache.thrift.protocol.TField("nestedField", org.apache.thrift.protocol.TType.STRUCT, (short)5);
private static final org.apache.thrift.protocol.TField NAME_MAPPING_FIELD_DESC = new org.apache.thrift.protocol.TField("name_mapping", org.apache.thrift.protocol.TType.LIST, (short)6);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TFieldStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TFieldTupleSchemeFactory();
public boolean is_optional; // optional
public int id; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String name; // optional
public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TColumnType type; // optional
public @org.apache.thrift.annotation.Nullable TNestedField nestedField; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> name_mapping; // 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 {
IS_OPTIONAL((short)1, "is_optional"),
ID((short)2, "id"),
NAME((short)3, "name"),
TYPE((short)4, "type"),
NESTED_FIELD((short)5, "nestedField"),
NAME_MAPPING((short)6, "name_mapping");
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: // IS_OPTIONAL
return IS_OPTIONAL;
case 2: // ID
return ID;
case 3: // NAME
return NAME;
case 4: // TYPE
return TYPE;
case 5: // NESTED_FIELD
return NESTED_FIELD;
case 6: // NAME_MAPPING
return NAME_MAPPING;
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 __IS_OPTIONAL_ISSET_ID = 0;
private static final int __ID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.IS_OPTIONAL,_Fields.ID,_Fields.NAME,_Fields.TYPE,_Fields.NESTED_FIELD,_Fields.NAME_MAPPING};
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.IS_OPTIONAL, new org.apache.thrift.meta_data.FieldMetaData("is_optional", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TColumnType.class)));
tmpMap.put(_Fields.NESTED_FIELD, new org.apache.thrift.meta_data.FieldMetaData("nestedField", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNestedField.class)));
tmpMap.put(_Fields.NAME_MAPPING, new org.apache.thrift.meta_data.FieldMetaData("name_mapping", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TField.class, metaDataMap);
}
public TField() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TField(TField other) {
__isset_bitfield = other.__isset_bitfield;
this.is_optional = other.is_optional;
this.id = other.id;
if (other.isSetName()) {
this.name = other.name;
}
if (other.isSetType()) {
this.type = new org.apache.doris.thrift.TColumnType(other.type);
}
if (other.isSetNestedField()) {
this.nestedField = new TNestedField(other.nestedField);
}
if (other.isSetNameMapping()) {
java.util.List<java.lang.String> __this__name_mapping = new java.util.ArrayList<java.lang.String>(other.name_mapping);
this.name_mapping = __this__name_mapping;
}
}
public TField deepCopy() {
return new TField(this);
}
@Override
public void clear() {
setIsOptionalIsSet(false);
this.is_optional = false;
setIdIsSet(false);
this.id = 0;
this.name = null;
this.type = null;
this.nestedField = null;
this.name_mapping = null;
}
public boolean isIsOptional() {
return this.is_optional;
}
public TField setIsOptional(boolean is_optional) {
this.is_optional = is_optional;
setIsOptionalIsSet(true);
return this;
}
public void unsetIsOptional() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_OPTIONAL_ISSET_ID);
}
/** Returns true if field is_optional is set (has been assigned a value) and false otherwise */
public boolean isSetIsOptional() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_OPTIONAL_ISSET_ID);
}
public void setIsOptionalIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_OPTIONAL_ISSET_ID, value);
}
public int getId() {
return this.id;
}
public TField setId(int id) {
this.id = id;
setIdIsSet(true);
return this;
}
public void unsetId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID);
}
/** Returns true if field id is set (has been assigned a value) and false otherwise */
public boolean isSetId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);
}
public void setIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getName() {
return this.name;
}
public TField setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
this.name = name;
return this;
}
public void unsetName() {
this.name = null;
}
/** Returns true if field name is set (has been assigned a value) and false otherwise */
public boolean isSetName() {
return this.name != null;
}
public void setNameIsSet(boolean value) {
if (!value) {
this.name = null;
}
}
@org.apache.thrift.annotation.Nullable
public org.apache.doris.thrift.TColumnType getType() {
return this.type;
}
public TField setType(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TColumnType type) {
this.type = type;
return this;
}
public void unsetType() {
this.type = null;
}
/** Returns true if field type is set (has been assigned a value) and false otherwise */
public boolean isSetType() {
return this.type != null;
}
public void setTypeIsSet(boolean value) {
if (!value) {
this.type = null;
}
}
@org.apache.thrift.annotation.Nullable
public TNestedField getNestedField() {
return this.nestedField;
}
public TField setNestedField(@org.apache.thrift.annotation.Nullable TNestedField nestedField) {
this.nestedField = nestedField;
return this;
}
public void unsetNestedField() {
this.nestedField = null;
}
/** Returns true if field nestedField is set (has been assigned a value) and false otherwise */
public boolean isSetNestedField() {
return this.nestedField != null;
}
public void setNestedFieldIsSet(boolean value) {
if (!value) {
this.nestedField = null;
}
}
public int getNameMappingSize() {
return (this.name_mapping == null) ? 0 : this.name_mapping.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.String> getNameMappingIterator() {
return (this.name_mapping == null) ? null : this.name_mapping.iterator();
}
public void addToNameMapping(java.lang.String elem) {
if (this.name_mapping == null) {
this.name_mapping = new java.util.ArrayList<java.lang.String>();
}
this.name_mapping.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.String> getNameMapping() {
return this.name_mapping;
}
public TField setNameMapping(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> name_mapping) {
this.name_mapping = name_mapping;
return this;
}
public void unsetNameMapping() {
this.name_mapping = null;
}
/** Returns true if field name_mapping is set (has been assigned a value) and false otherwise */
public boolean isSetNameMapping() {
return this.name_mapping != null;
}
public void setNameMappingIsSet(boolean value) {
if (!value) {
this.name_mapping = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case IS_OPTIONAL:
if (value == null) {
unsetIsOptional();
} else {
setIsOptional((java.lang.Boolean)value);
}
break;
case ID:
if (value == null) {
unsetId();
} else {
setId((java.lang.Integer)value);
}
break;
case NAME:
if (value == null) {
unsetName();
} else {
setName((java.lang.String)value);
}
break;
case TYPE:
if (value == null) {
unsetType();
} else {
setType((org.apache.doris.thrift.TColumnType)value);
}
break;
case NESTED_FIELD:
if (value == null) {
unsetNestedField();
} else {
setNestedField((TNestedField)value);
}
break;
case NAME_MAPPING:
if (value == null) {
unsetNameMapping();
} else {
setNameMapping((java.util.List<java.lang.String>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case IS_OPTIONAL:
return isIsOptional();
case ID:
return getId();
case NAME:
return getName();
case TYPE:
return getType();
case NESTED_FIELD:
return getNestedField();
case NAME_MAPPING:
return getNameMapping();
}
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 IS_OPTIONAL:
return isSetIsOptional();
case ID:
return isSetId();
case NAME:
return isSetName();
case TYPE:
return isSetType();
case NESTED_FIELD:
return isSetNestedField();
case NAME_MAPPING:
return isSetNameMapping();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TField)
return this.equals((TField)that);
return false;
}
public boolean equals(TField that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_is_optional = true && this.isSetIsOptional();
boolean that_present_is_optional = true && that.isSetIsOptional();
if (this_present_is_optional || that_present_is_optional) {
if (!(this_present_is_optional && that_present_is_optional))
return false;
if (this.is_optional != that.is_optional)
return false;
}
boolean this_present_id = true && this.isSetId();
boolean that_present_id = true && that.isSetId();
if (this_present_id || that_present_id) {
if (!(this_present_id && that_present_id))
return false;
if (this.id != that.id)
return false;
}
boolean this_present_name = true && this.isSetName();
boolean that_present_name = true && that.isSetName();
if (this_present_name || that_present_name) {
if (!(this_present_name && that_present_name))
return false;
if (!this.name.equals(that.name))
return false;
}
boolean this_present_type = true && this.isSetType();
boolean that_present_type = true && that.isSetType();
if (this_present_type || that_present_type) {
if (!(this_present_type && that_present_type))
return false;
if (!this.type.equals(that.type))
return false;
}
boolean this_present_nestedField = true && this.isSetNestedField();
boolean that_present_nestedField = true && that.isSetNestedField();
if (this_present_nestedField || that_present_nestedField) {
if (!(this_present_nestedField && that_present_nestedField))
return false;
if (!this.nestedField.equals(that.nestedField))
return false;
}
boolean this_present_name_mapping = true && this.isSetNameMapping();
boolean that_present_name_mapping = true && that.isSetNameMapping();
if (this_present_name_mapping || that_present_name_mapping) {
if (!(this_present_name_mapping && that_present_name_mapping))
return false;
if (!this.name_mapping.equals(that.name_mapping))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetIsOptional()) ? 131071 : 524287);
if (isSetIsOptional())
hashCode = hashCode * 8191 + ((is_optional) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetId()) ? 131071 : 524287);
if (isSetId())
hashCode = hashCode * 8191 + id;
hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
if (isSetName())
hashCode = hashCode * 8191 + name.hashCode();
hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287);
if (isSetType())
hashCode = hashCode * 8191 + type.hashCode();
hashCode = hashCode * 8191 + ((isSetNestedField()) ? 131071 : 524287);
if (isSetNestedField())
hashCode = hashCode * 8191 + nestedField.hashCode();
hashCode = hashCode * 8191 + ((isSetNameMapping()) ? 131071 : 524287);
if (isSetNameMapping())
hashCode = hashCode * 8191 + name_mapping.hashCode();
return hashCode;
}
@Override
public int compareTo(TField other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetIsOptional(), other.isSetIsOptional());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIsOptional()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_optional, other.is_optional);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetId(), other.isSetId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetType()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetNestedField(), other.isSetNestedField());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNestedField()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nestedField, other.nestedField);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetNameMapping(), other.isSetNameMapping());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNameMapping()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name_mapping, other.name_mapping);
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("TField(");
boolean first = true;
if (isSetIsOptional()) {
sb.append("is_optional:");
sb.append(this.is_optional);
first = false;
}
if (isSetId()) {
if (!first) sb.append(", ");
sb.append("id:");
sb.append(this.id);
first = false;
}
if (isSetName()) {
if (!first) sb.append(", ");
sb.append("name:");
if (this.name == null) {
sb.append("null");
} else {
sb.append(this.name);
}
first = false;
}
if (isSetType()) {
if (!first) sb.append(", ");
sb.append("type:");
if (this.type == null) {
sb.append("null");
} else {
sb.append(this.type);
}
first = false;
}
if (isSetNestedField()) {
if (!first) sb.append(", ");
sb.append("nestedField:");
if (this.nestedField == null) {
sb.append("null");
} else {
sb.append(this.nestedField);
}
first = false;
}
if (isSetNameMapping()) {
if (!first) sb.append(", ");
sb.append("name_mapping:");
if (this.name_mapping == null) {
sb.append("null");
} else {
sb.append(this.name_mapping);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (type != null) {
type.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 TFieldStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TFieldStandardScheme getScheme() {
return new TFieldStandardScheme();
}
}
private static class TFieldStandardScheme extends org.apache.thrift.scheme.StandardScheme<TField> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TField 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: // IS_OPTIONAL
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.is_optional = iprot.readBool();
struct.setIsOptionalIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // ID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.id = iprot.readI32();
struct.setIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.name = iprot.readString();
struct.setNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.type = new org.apache.doris.thrift.TColumnType();
struct.type.read(iprot);
struct.setTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // NESTED_FIELD
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.nestedField = new TNestedField();
struct.nestedField.read(iprot);
struct.setNestedFieldIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // NAME_MAPPING
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
struct.name_mapping = new java.util.ArrayList<java.lang.String>(_list8.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem9;
for (int _i10 = 0; _i10 < _list8.size; ++_i10)
{
_elem9 = iprot.readString();
struct.name_mapping.add(_elem9);
}
iprot.readListEnd();
}
struct.setNameMappingIsSet(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, TField struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetIsOptional()) {
oprot.writeFieldBegin(IS_OPTIONAL_FIELD_DESC);
oprot.writeBool(struct.is_optional);
oprot.writeFieldEnd();
}
if (struct.isSetId()) {
oprot.writeFieldBegin(ID_FIELD_DESC);
oprot.writeI32(struct.id);
oprot.writeFieldEnd();
}
if (struct.name != null) {
if (struct.isSetName()) {
oprot.writeFieldBegin(NAME_FIELD_DESC);
oprot.writeString(struct.name);
oprot.writeFieldEnd();
}
}
if (struct.type != null) {
if (struct.isSetType()) {
oprot.writeFieldBegin(TYPE_FIELD_DESC);
struct.type.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.nestedField != null) {
if (struct.isSetNestedField()) {
oprot.writeFieldBegin(NESTED_FIELD_FIELD_DESC);
struct.nestedField.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.name_mapping != null) {
if (struct.isSetNameMapping()) {
oprot.writeFieldBegin(NAME_MAPPING_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.name_mapping.size()));
for (java.lang.String _iter11 : struct.name_mapping)
{
oprot.writeString(_iter11);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TFieldTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TFieldTupleScheme getScheme() {
return new TFieldTupleScheme();
}
}
private static class TFieldTupleScheme extends org.apache.thrift.scheme.TupleScheme<TField> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TField 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.isSetIsOptional()) {
optionals.set(0);
}
if (struct.isSetId()) {
optionals.set(1);
}
if (struct.isSetName()) {
optionals.set(2);
}
if (struct.isSetType()) {
optionals.set(3);
}
if (struct.isSetNestedField()) {
optionals.set(4);
}
if (struct.isSetNameMapping()) {
optionals.set(5);
}
oprot.writeBitSet(optionals, 6);
if (struct.isSetIsOptional()) {
oprot.writeBool(struct.is_optional);
}
if (struct.isSetId()) {
oprot.writeI32(struct.id);
}
if (struct.isSetName()) {
oprot.writeString(struct.name);
}
if (struct.isSetType()) {
struct.type.write(oprot);
}
if (struct.isSetNestedField()) {
struct.nestedField.write(oprot);
}
if (struct.isSetNameMapping()) {
{
oprot.writeI32(struct.name_mapping.size());
for (java.lang.String _iter12 : struct.name_mapping)
{
oprot.writeString(_iter12);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TField struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(6);
if (incoming.get(0)) {
struct.is_optional = iprot.readBool();
struct.setIsOptionalIsSet(true);
}
if (incoming.get(1)) {
struct.id = iprot.readI32();
struct.setIdIsSet(true);
}
if (incoming.get(2)) {
struct.name = iprot.readString();
struct.setNameIsSet(true);
}
if (incoming.get(3)) {
struct.type = new org.apache.doris.thrift.TColumnType();
struct.type.read(iprot);
struct.setTypeIsSet(true);
}
if (incoming.get(4)) {
struct.nestedField = new TNestedField();
struct.nestedField.read(iprot);
struct.setNestedFieldIsSet(true);
}
if (incoming.get(5)) {
{
org.apache.thrift.protocol.TList _list13 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.name_mapping = new java.util.ArrayList<java.lang.String>(_list13.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem14;
for (int _i15 = 0; _i15 < _list13.size; ++_i15)
{
_elem14 = iprot.readString();
struct.name_mapping.add(_elem14);
}
}
struct.setNameMappingIsSet(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();
}
}