TColumnDesc.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 TColumnDesc implements org.apache.thrift.TBase<TColumnDesc, TColumnDesc._Fields>, java.io.Serializable, Cloneable, Comparable<TColumnDesc> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnDesc");
private static final org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("columnName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField COLUMN_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("columnType", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField COLUMN_LENGTH_FIELD_DESC = new org.apache.thrift.protocol.TField("columnLength", org.apache.thrift.protocol.TType.I32, (short)3);
private static final org.apache.thrift.protocol.TField COLUMN_PRECISION_FIELD_DESC = new org.apache.thrift.protocol.TField("columnPrecision", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField COLUMN_SCALE_FIELD_DESC = new org.apache.thrift.protocol.TField("columnScale", org.apache.thrift.protocol.TType.I32, (short)5);
private static final org.apache.thrift.protocol.TField IS_ALLOW_NULL_FIELD_DESC = new org.apache.thrift.protocol.TField("isAllowNull", org.apache.thrift.protocol.TType.BOOL, (short)6);
private static final org.apache.thrift.protocol.TField COLUMN_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("columnKey", org.apache.thrift.protocol.TType.STRING, (short)7);
private static final org.apache.thrift.protocol.TField CHILDREN_FIELD_DESC = new org.apache.thrift.protocol.TField("children", org.apache.thrift.protocol.TType.LIST, (short)8);
private static final org.apache.thrift.protocol.TField DEFAULT_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultValue", org.apache.thrift.protocol.TType.STRING, (short)9);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TColumnDescStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TColumnDescTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String columnName; // required
/**
*
* @see org.apache.doris.thrift.TPrimitiveType
*/
public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TPrimitiveType columnType; // required
public int columnLength; // optional
public int columnPrecision; // optional
public int columnScale; // optional
public boolean isAllowNull; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String columnKey; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<TColumnDesc> children; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String defaultValue; // 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, "columnName"),
/**
*
* @see org.apache.doris.thrift.TPrimitiveType
*/
COLUMN_TYPE((short)2, "columnType"),
COLUMN_LENGTH((short)3, "columnLength"),
COLUMN_PRECISION((short)4, "columnPrecision"),
COLUMN_SCALE((short)5, "columnScale"),
IS_ALLOW_NULL((short)6, "isAllowNull"),
COLUMN_KEY((short)7, "columnKey"),
CHILDREN((short)8, "children"),
DEFAULT_VALUE((short)9, "defaultValue");
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: // COLUMN_TYPE
return COLUMN_TYPE;
case 3: // COLUMN_LENGTH
return COLUMN_LENGTH;
case 4: // COLUMN_PRECISION
return COLUMN_PRECISION;
case 5: // COLUMN_SCALE
return COLUMN_SCALE;
case 6: // IS_ALLOW_NULL
return IS_ALLOW_NULL;
case 7: // COLUMN_KEY
return COLUMN_KEY;
case 8: // CHILDREN
return CHILDREN;
case 9: // DEFAULT_VALUE
return DEFAULT_VALUE;
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 __COLUMNLENGTH_ISSET_ID = 0;
private static final int __COLUMNPRECISION_ISSET_ID = 1;
private static final int __COLUMNSCALE_ISSET_ID = 2;
private static final int __ISALLOWNULL_ISSET_ID = 3;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.COLUMN_LENGTH,_Fields.COLUMN_PRECISION,_Fields.COLUMN_SCALE,_Fields.IS_ALLOW_NULL,_Fields.COLUMN_KEY,_Fields.CHILDREN,_Fields.DEFAULT_VALUE};
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("columnName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.COLUMN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("columnType", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.doris.thrift.TPrimitiveType.class)));
tmpMap.put(_Fields.COLUMN_LENGTH, new org.apache.thrift.meta_data.FieldMetaData("columnLength", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.COLUMN_PRECISION, new org.apache.thrift.meta_data.FieldMetaData("columnPrecision", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.COLUMN_SCALE, new org.apache.thrift.meta_data.FieldMetaData("columnScale", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.IS_ALLOW_NULL, new org.apache.thrift.meta_data.FieldMetaData("isAllowNull", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.COLUMN_KEY, new org.apache.thrift.meta_data.FieldMetaData("columnKey", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.CHILDREN, new org.apache.thrift.meta_data.FieldMetaData("children", 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.STRUCT , "TColumnDesc"))));
tmpMap.put(_Fields.DEFAULT_VALUE, new org.apache.thrift.meta_data.FieldMetaData("defaultValue", 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(TColumnDesc.class, metaDataMap);
}
public TColumnDesc() {
}
public TColumnDesc(
java.lang.String columnName,
org.apache.doris.thrift.TPrimitiveType columnType)
{
this();
this.columnName = columnName;
this.columnType = columnType;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TColumnDesc(TColumnDesc other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetColumnName()) {
this.columnName = other.columnName;
}
if (other.isSetColumnType()) {
this.columnType = other.columnType;
}
this.columnLength = other.columnLength;
this.columnPrecision = other.columnPrecision;
this.columnScale = other.columnScale;
this.isAllowNull = other.isAllowNull;
if (other.isSetColumnKey()) {
this.columnKey = other.columnKey;
}
if (other.isSetChildren()) {
java.util.List<TColumnDesc> __this__children = new java.util.ArrayList<TColumnDesc>(other.children.size());
for (TColumnDesc other_element : other.children) {
__this__children.add(new TColumnDesc(other_element));
}
this.children = __this__children;
}
if (other.isSetDefaultValue()) {
this.defaultValue = other.defaultValue;
}
}
public TColumnDesc deepCopy() {
return new TColumnDesc(this);
}
@Override
public void clear() {
this.columnName = null;
this.columnType = null;
setColumnLengthIsSet(false);
this.columnLength = 0;
setColumnPrecisionIsSet(false);
this.columnPrecision = 0;
setColumnScaleIsSet(false);
this.columnScale = 0;
setIsAllowNullIsSet(false);
this.isAllowNull = false;
this.columnKey = null;
this.children = null;
this.defaultValue = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getColumnName() {
return this.columnName;
}
public TColumnDesc setColumnName(@org.apache.thrift.annotation.Nullable java.lang.String columnName) {
this.columnName = columnName;
return this;
}
public void unsetColumnName() {
this.columnName = null;
}
/** Returns true if field columnName is set (has been assigned a value) and false otherwise */
public boolean isSetColumnName() {
return this.columnName != null;
}
public void setColumnNameIsSet(boolean value) {
if (!value) {
this.columnName = null;
}
}
/**
*
* @see org.apache.doris.thrift.TPrimitiveType
*/
@org.apache.thrift.annotation.Nullable
public org.apache.doris.thrift.TPrimitiveType getColumnType() {
return this.columnType;
}
/**
*
* @see org.apache.doris.thrift.TPrimitiveType
*/
public TColumnDesc setColumnType(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TPrimitiveType columnType) {
this.columnType = columnType;
return this;
}
public void unsetColumnType() {
this.columnType = null;
}
/** Returns true if field columnType is set (has been assigned a value) and false otherwise */
public boolean isSetColumnType() {
return this.columnType != null;
}
public void setColumnTypeIsSet(boolean value) {
if (!value) {
this.columnType = null;
}
}
public int getColumnLength() {
return this.columnLength;
}
public TColumnDesc setColumnLength(int columnLength) {
this.columnLength = columnLength;
setColumnLengthIsSet(true);
return this;
}
public void unsetColumnLength() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNLENGTH_ISSET_ID);
}
/** Returns true if field columnLength is set (has been assigned a value) and false otherwise */
public boolean isSetColumnLength() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNLENGTH_ISSET_ID);
}
public void setColumnLengthIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNLENGTH_ISSET_ID, value);
}
public int getColumnPrecision() {
return this.columnPrecision;
}
public TColumnDesc setColumnPrecision(int columnPrecision) {
this.columnPrecision = columnPrecision;
setColumnPrecisionIsSet(true);
return this;
}
public void unsetColumnPrecision() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNPRECISION_ISSET_ID);
}
/** Returns true if field columnPrecision is set (has been assigned a value) and false otherwise */
public boolean isSetColumnPrecision() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNPRECISION_ISSET_ID);
}
public void setColumnPrecisionIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNPRECISION_ISSET_ID, value);
}
public int getColumnScale() {
return this.columnScale;
}
public TColumnDesc setColumnScale(int columnScale) {
this.columnScale = columnScale;
setColumnScaleIsSet(true);
return this;
}
public void unsetColumnScale() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNSCALE_ISSET_ID);
}
/** Returns true if field columnScale is set (has been assigned a value) and false otherwise */
public boolean isSetColumnScale() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNSCALE_ISSET_ID);
}
public void setColumnScaleIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNSCALE_ISSET_ID, value);
}
public boolean isIsAllowNull() {
return this.isAllowNull;
}
public TColumnDesc setIsAllowNull(boolean isAllowNull) {
this.isAllowNull = isAllowNull;
setIsAllowNullIsSet(true);
return this;
}
public void unsetIsAllowNull() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALLOWNULL_ISSET_ID);
}
/** Returns true if field isAllowNull is set (has been assigned a value) and false otherwise */
public boolean isSetIsAllowNull() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALLOWNULL_ISSET_ID);
}
public void setIsAllowNullIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALLOWNULL_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getColumnKey() {
return this.columnKey;
}
public TColumnDesc setColumnKey(@org.apache.thrift.annotation.Nullable java.lang.String columnKey) {
this.columnKey = columnKey;
return this;
}
public void unsetColumnKey() {
this.columnKey = null;
}
/** Returns true if field columnKey is set (has been assigned a value) and false otherwise */
public boolean isSetColumnKey() {
return this.columnKey != null;
}
public void setColumnKeyIsSet(boolean value) {
if (!value) {
this.columnKey = null;
}
}
public int getChildrenSize() {
return (this.children == null) ? 0 : this.children.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TColumnDesc> getChildrenIterator() {
return (this.children == null) ? null : this.children.iterator();
}
public void addToChildren(TColumnDesc elem) {
if (this.children == null) {
this.children = new java.util.ArrayList<TColumnDesc>();
}
this.children.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<TColumnDesc> getChildren() {
return this.children;
}
public TColumnDesc setChildren(@org.apache.thrift.annotation.Nullable java.util.List<TColumnDesc> children) {
this.children = children;
return this;
}
public void unsetChildren() {
this.children = null;
}
/** Returns true if field children is set (has been assigned a value) and false otherwise */
public boolean isSetChildren() {
return this.children != null;
}
public void setChildrenIsSet(boolean value) {
if (!value) {
this.children = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDefaultValue() {
return this.defaultValue;
}
public TColumnDesc setDefaultValue(@org.apache.thrift.annotation.Nullable java.lang.String defaultValue) {
this.defaultValue = defaultValue;
return this;
}
public void unsetDefaultValue() {
this.defaultValue = null;
}
/** Returns true if field defaultValue is set (has been assigned a value) and false otherwise */
public boolean isSetDefaultValue() {
return this.defaultValue != null;
}
public void setDefaultValueIsSet(boolean value) {
if (!value) {
this.defaultValue = 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 COLUMN_TYPE:
if (value == null) {
unsetColumnType();
} else {
setColumnType((org.apache.doris.thrift.TPrimitiveType)value);
}
break;
case COLUMN_LENGTH:
if (value == null) {
unsetColumnLength();
} else {
setColumnLength((java.lang.Integer)value);
}
break;
case COLUMN_PRECISION:
if (value == null) {
unsetColumnPrecision();
} else {
setColumnPrecision((java.lang.Integer)value);
}
break;
case COLUMN_SCALE:
if (value == null) {
unsetColumnScale();
} else {
setColumnScale((java.lang.Integer)value);
}
break;
case IS_ALLOW_NULL:
if (value == null) {
unsetIsAllowNull();
} else {
setIsAllowNull((java.lang.Boolean)value);
}
break;
case COLUMN_KEY:
if (value == null) {
unsetColumnKey();
} else {
setColumnKey((java.lang.String)value);
}
break;
case CHILDREN:
if (value == null) {
unsetChildren();
} else {
setChildren((java.util.List<TColumnDesc>)value);
}
break;
case DEFAULT_VALUE:
if (value == null) {
unsetDefaultValue();
} else {
setDefaultValue((java.lang.String)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case COLUMN_NAME:
return getColumnName();
case COLUMN_TYPE:
return getColumnType();
case COLUMN_LENGTH:
return getColumnLength();
case COLUMN_PRECISION:
return getColumnPrecision();
case COLUMN_SCALE:
return getColumnScale();
case IS_ALLOW_NULL:
return isIsAllowNull();
case COLUMN_KEY:
return getColumnKey();
case CHILDREN:
return getChildren();
case DEFAULT_VALUE:
return getDefaultValue();
}
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 COLUMN_TYPE:
return isSetColumnType();
case COLUMN_LENGTH:
return isSetColumnLength();
case COLUMN_PRECISION:
return isSetColumnPrecision();
case COLUMN_SCALE:
return isSetColumnScale();
case IS_ALLOW_NULL:
return isSetIsAllowNull();
case COLUMN_KEY:
return isSetColumnKey();
case CHILDREN:
return isSetChildren();
case DEFAULT_VALUE:
return isSetDefaultValue();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TColumnDesc)
return this.equals((TColumnDesc)that);
return false;
}
public boolean equals(TColumnDesc that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_columnName = true && this.isSetColumnName();
boolean that_present_columnName = true && that.isSetColumnName();
if (this_present_columnName || that_present_columnName) {
if (!(this_present_columnName && that_present_columnName))
return false;
if (!this.columnName.equals(that.columnName))
return false;
}
boolean this_present_columnType = true && this.isSetColumnType();
boolean that_present_columnType = true && that.isSetColumnType();
if (this_present_columnType || that_present_columnType) {
if (!(this_present_columnType && that_present_columnType))
return false;
if (!this.columnType.equals(that.columnType))
return false;
}
boolean this_present_columnLength = true && this.isSetColumnLength();
boolean that_present_columnLength = true && that.isSetColumnLength();
if (this_present_columnLength || that_present_columnLength) {
if (!(this_present_columnLength && that_present_columnLength))
return false;
if (this.columnLength != that.columnLength)
return false;
}
boolean this_present_columnPrecision = true && this.isSetColumnPrecision();
boolean that_present_columnPrecision = true && that.isSetColumnPrecision();
if (this_present_columnPrecision || that_present_columnPrecision) {
if (!(this_present_columnPrecision && that_present_columnPrecision))
return false;
if (this.columnPrecision != that.columnPrecision)
return false;
}
boolean this_present_columnScale = true && this.isSetColumnScale();
boolean that_present_columnScale = true && that.isSetColumnScale();
if (this_present_columnScale || that_present_columnScale) {
if (!(this_present_columnScale && that_present_columnScale))
return false;
if (this.columnScale != that.columnScale)
return false;
}
boolean this_present_isAllowNull = true && this.isSetIsAllowNull();
boolean that_present_isAllowNull = true && that.isSetIsAllowNull();
if (this_present_isAllowNull || that_present_isAllowNull) {
if (!(this_present_isAllowNull && that_present_isAllowNull))
return false;
if (this.isAllowNull != that.isAllowNull)
return false;
}
boolean this_present_columnKey = true && this.isSetColumnKey();
boolean that_present_columnKey = true && that.isSetColumnKey();
if (this_present_columnKey || that_present_columnKey) {
if (!(this_present_columnKey && that_present_columnKey))
return false;
if (!this.columnKey.equals(that.columnKey))
return false;
}
boolean this_present_children = true && this.isSetChildren();
boolean that_present_children = true && that.isSetChildren();
if (this_present_children || that_present_children) {
if (!(this_present_children && that_present_children))
return false;
if (!this.children.equals(that.children))
return false;
}
boolean this_present_defaultValue = true && this.isSetDefaultValue();
boolean that_present_defaultValue = true && that.isSetDefaultValue();
if (this_present_defaultValue || that_present_defaultValue) {
if (!(this_present_defaultValue && that_present_defaultValue))
return false;
if (!this.defaultValue.equals(that.defaultValue))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetColumnName()) ? 131071 : 524287);
if (isSetColumnName())
hashCode = hashCode * 8191 + columnName.hashCode();
hashCode = hashCode * 8191 + ((isSetColumnType()) ? 131071 : 524287);
if (isSetColumnType())
hashCode = hashCode * 8191 + columnType.getValue();
hashCode = hashCode * 8191 + ((isSetColumnLength()) ? 131071 : 524287);
if (isSetColumnLength())
hashCode = hashCode * 8191 + columnLength;
hashCode = hashCode * 8191 + ((isSetColumnPrecision()) ? 131071 : 524287);
if (isSetColumnPrecision())
hashCode = hashCode * 8191 + columnPrecision;
hashCode = hashCode * 8191 + ((isSetColumnScale()) ? 131071 : 524287);
if (isSetColumnScale())
hashCode = hashCode * 8191 + columnScale;
hashCode = hashCode * 8191 + ((isSetIsAllowNull()) ? 131071 : 524287);
if (isSetIsAllowNull())
hashCode = hashCode * 8191 + ((isAllowNull) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetColumnKey()) ? 131071 : 524287);
if (isSetColumnKey())
hashCode = hashCode * 8191 + columnKey.hashCode();
hashCode = hashCode * 8191 + ((isSetChildren()) ? 131071 : 524287);
if (isSetChildren())
hashCode = hashCode * 8191 + children.hashCode();
hashCode = hashCode * 8191 + ((isSetDefaultValue()) ? 131071 : 524287);
if (isSetDefaultValue())
hashCode = hashCode * 8191 + defaultValue.hashCode();
return hashCode;
}
@Override
public int compareTo(TColumnDesc 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.columnName, other.columnName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnType(), other.isSetColumnType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnType()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnType, other.columnType);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnLength(), other.isSetColumnLength());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnLength()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnLength, other.columnLength);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnPrecision(), other.isSetColumnPrecision());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnPrecision()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnPrecision, other.columnPrecision);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnScale(), other.isSetColumnScale());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnScale()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnScale, other.columnScale);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetIsAllowNull(), other.isSetIsAllowNull());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIsAllowNull()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAllowNull, other.isAllowNull);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnKey(), other.isSetColumnKey());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnKey()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnKey, other.columnKey);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetChildren(), other.isSetChildren());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetChildren()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.children, other.children);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDefaultValue(), other.isSetDefaultValue());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDefaultValue()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultValue, other.defaultValue);
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("TColumnDesc(");
boolean first = true;
sb.append("columnName:");
if (this.columnName == null) {
sb.append("null");
} else {
sb.append(this.columnName);
}
first = false;
if (!first) sb.append(", ");
sb.append("columnType:");
if (this.columnType == null) {
sb.append("null");
} else {
sb.append(this.columnType);
}
first = false;
if (isSetColumnLength()) {
if (!first) sb.append(", ");
sb.append("columnLength:");
sb.append(this.columnLength);
first = false;
}
if (isSetColumnPrecision()) {
if (!first) sb.append(", ");
sb.append("columnPrecision:");
sb.append(this.columnPrecision);
first = false;
}
if (isSetColumnScale()) {
if (!first) sb.append(", ");
sb.append("columnScale:");
sb.append(this.columnScale);
first = false;
}
if (isSetIsAllowNull()) {
if (!first) sb.append(", ");
sb.append("isAllowNull:");
sb.append(this.isAllowNull);
first = false;
}
if (isSetColumnKey()) {
if (!first) sb.append(", ");
sb.append("columnKey:");
if (this.columnKey == null) {
sb.append("null");
} else {
sb.append(this.columnKey);
}
first = false;
}
if (isSetChildren()) {
if (!first) sb.append(", ");
sb.append("children:");
if (this.children == null) {
sb.append("null");
} else {
sb.append(this.children);
}
first = false;
}
if (isSetDefaultValue()) {
if (!first) sb.append(", ");
sb.append("defaultValue:");
if (this.defaultValue == null) {
sb.append("null");
} else {
sb.append(this.defaultValue);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (columnName == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnName' was not present! Struct: " + toString());
}
if (columnType == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnType' 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 TColumnDescStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TColumnDescStandardScheme getScheme() {
return new TColumnDescStandardScheme();
}
}
private static class TColumnDescStandardScheme extends org.apache.thrift.scheme.StandardScheme<TColumnDesc> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TColumnDesc 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.columnName = iprot.readString();
struct.setColumnNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // COLUMN_TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.columnType = org.apache.doris.thrift.TPrimitiveType.findByValue(iprot.readI32());
struct.setColumnTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // COLUMN_LENGTH
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.columnLength = iprot.readI32();
struct.setColumnLengthIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // COLUMN_PRECISION
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.columnPrecision = iprot.readI32();
struct.setColumnPrecisionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // COLUMN_SCALE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.columnScale = iprot.readI32();
struct.setColumnScaleIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // IS_ALLOW_NULL
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.isAllowNull = iprot.readBool();
struct.setIsAllowNullIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // COLUMN_KEY
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.columnKey = iprot.readString();
struct.setColumnKeyIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // CHILDREN
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
struct.children = new java.util.ArrayList<TColumnDesc>(_list0.size);
@org.apache.thrift.annotation.Nullable TColumnDesc _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = new TColumnDesc();
_elem1.read(iprot);
struct.children.add(_elem1);
}
iprot.readListEnd();
}
struct.setChildrenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // DEFAULT_VALUE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.defaultValue = iprot.readString();
struct.setDefaultValueIsSet(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, TColumnDesc struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.columnName != null) {
oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC);
oprot.writeString(struct.columnName);
oprot.writeFieldEnd();
}
if (struct.columnType != null) {
oprot.writeFieldBegin(COLUMN_TYPE_FIELD_DESC);
oprot.writeI32(struct.columnType.getValue());
oprot.writeFieldEnd();
}
if (struct.isSetColumnLength()) {
oprot.writeFieldBegin(COLUMN_LENGTH_FIELD_DESC);
oprot.writeI32(struct.columnLength);
oprot.writeFieldEnd();
}
if (struct.isSetColumnPrecision()) {
oprot.writeFieldBegin(COLUMN_PRECISION_FIELD_DESC);
oprot.writeI32(struct.columnPrecision);
oprot.writeFieldEnd();
}
if (struct.isSetColumnScale()) {
oprot.writeFieldBegin(COLUMN_SCALE_FIELD_DESC);
oprot.writeI32(struct.columnScale);
oprot.writeFieldEnd();
}
if (struct.isSetIsAllowNull()) {
oprot.writeFieldBegin(IS_ALLOW_NULL_FIELD_DESC);
oprot.writeBool(struct.isAllowNull);
oprot.writeFieldEnd();
}
if (struct.columnKey != null) {
if (struct.isSetColumnKey()) {
oprot.writeFieldBegin(COLUMN_KEY_FIELD_DESC);
oprot.writeString(struct.columnKey);
oprot.writeFieldEnd();
}
}
if (struct.children != null) {
if (struct.isSetChildren()) {
oprot.writeFieldBegin(CHILDREN_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.children.size()));
for (TColumnDesc _iter3 : struct.children)
{
_iter3.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.defaultValue != null) {
if (struct.isSetDefaultValue()) {
oprot.writeFieldBegin(DEFAULT_VALUE_FIELD_DESC);
oprot.writeString(struct.defaultValue);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TColumnDescTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TColumnDescTupleScheme getScheme() {
return new TColumnDescTupleScheme();
}
}
private static class TColumnDescTupleScheme extends org.apache.thrift.scheme.TupleScheme<TColumnDesc> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TColumnDesc struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.columnName);
oprot.writeI32(struct.columnType.getValue());
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetColumnLength()) {
optionals.set(0);
}
if (struct.isSetColumnPrecision()) {
optionals.set(1);
}
if (struct.isSetColumnScale()) {
optionals.set(2);
}
if (struct.isSetIsAllowNull()) {
optionals.set(3);
}
if (struct.isSetColumnKey()) {
optionals.set(4);
}
if (struct.isSetChildren()) {
optionals.set(5);
}
if (struct.isSetDefaultValue()) {
optionals.set(6);
}
oprot.writeBitSet(optionals, 7);
if (struct.isSetColumnLength()) {
oprot.writeI32(struct.columnLength);
}
if (struct.isSetColumnPrecision()) {
oprot.writeI32(struct.columnPrecision);
}
if (struct.isSetColumnScale()) {
oprot.writeI32(struct.columnScale);
}
if (struct.isSetIsAllowNull()) {
oprot.writeBool(struct.isAllowNull);
}
if (struct.isSetColumnKey()) {
oprot.writeString(struct.columnKey);
}
if (struct.isSetChildren()) {
{
oprot.writeI32(struct.children.size());
for (TColumnDesc _iter4 : struct.children)
{
_iter4.write(oprot);
}
}
}
if (struct.isSetDefaultValue()) {
oprot.writeString(struct.defaultValue);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TColumnDesc struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.columnName = iprot.readString();
struct.setColumnNameIsSet(true);
struct.columnType = org.apache.doris.thrift.TPrimitiveType.findByValue(iprot.readI32());
struct.setColumnTypeIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(7);
if (incoming.get(0)) {
struct.columnLength = iprot.readI32();
struct.setColumnLengthIsSet(true);
}
if (incoming.get(1)) {
struct.columnPrecision = iprot.readI32();
struct.setColumnPrecisionIsSet(true);
}
if (incoming.get(2)) {
struct.columnScale = iprot.readI32();
struct.setColumnScaleIsSet(true);
}
if (incoming.get(3)) {
struct.isAllowNull = iprot.readBool();
struct.setIsAllowNullIsSet(true);
}
if (incoming.get(4)) {
struct.columnKey = iprot.readString();
struct.setColumnKeyIsSet(true);
}
if (incoming.get(5)) {
{
org.apache.thrift.protocol.TList _list5 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.children = new java.util.ArrayList<TColumnDesc>(_list5.size);
@org.apache.thrift.annotation.Nullable TColumnDesc _elem6;
for (int _i7 = 0; _i7 < _list5.size; ++_i7)
{
_elem6 = new TColumnDesc();
_elem6.read(iprot);
struct.children.add(_elem6);
}
}
struct.setChildrenIsSet(true);
}
if (incoming.get(6)) {
struct.defaultValue = iprot.readString();
struct.setDefaultValueIsSet(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();
}
}