TExternalTableSinkHashPartitionInfo.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-08-17")
public class TExternalTableSinkHashPartitionInfo implements org.apache.thrift.TBase<TExternalTableSinkHashPartitionInfo, TExternalTableSinkHashPartitionInfo._Fields>, java.io.Serializable, Cloneable, Comparable<TExternalTableSinkHashPartitionInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TExternalTableSinkHashPartitionInfo");
private static final org.apache.thrift.protocol.TField ALGORITHM_FIELD_DESC = new org.apache.thrift.protocol.TField("algorithm", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField PARTITION_TRANSFORMS_FIELD_DESC = new org.apache.thrift.protocol.TField("partition_transforms", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField WRITER_ASSIGNMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("writer_assignment", org.apache.thrift.protocol.TType.I32, (short)3);
private static final org.apache.thrift.protocol.TField PAIMON_FIXED_BUCKET_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("paimon_fixed_bucket_info", org.apache.thrift.protocol.TType.STRUCT, (short)4);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TExternalTableSinkHashPartitionInfoStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TExternalTableSinkHashPartitionInfoTupleSchemeFactory();
/**
*
* @see TExternalTableSinkHashAlgorithm
*/
public @org.apache.thrift.annotation.Nullable TExternalTableSinkHashAlgorithm algorithm; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> partition_transforms; // optional
/**
*
* @see TExternalTableSinkWriterAssignment
*/
public @org.apache.thrift.annotation.Nullable TExternalTableSinkWriterAssignment writer_assignment; // optional
public @org.apache.thrift.annotation.Nullable TPaimonFixedBucketInfo paimon_fixed_bucket_info; // 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 {
/**
*
* @see TExternalTableSinkHashAlgorithm
*/
ALGORITHM((short)1, "algorithm"),
PARTITION_TRANSFORMS((short)2, "partition_transforms"),
/**
*
* @see TExternalTableSinkWriterAssignment
*/
WRITER_ASSIGNMENT((short)3, "writer_assignment"),
PAIMON_FIXED_BUCKET_INFO((short)4, "paimon_fixed_bucket_info");
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: // ALGORITHM
return ALGORITHM;
case 2: // PARTITION_TRANSFORMS
return PARTITION_TRANSFORMS;
case 3: // WRITER_ASSIGNMENT
return WRITER_ASSIGNMENT;
case 4: // PAIMON_FIXED_BUCKET_INFO
return PAIMON_FIXED_BUCKET_INFO;
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.PARTITION_TRANSFORMS,_Fields.WRITER_ASSIGNMENT,_Fields.PAIMON_FIXED_BUCKET_INFO};
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.ALGORITHM, new org.apache.thrift.meta_data.FieldMetaData("algorithm", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TExternalTableSinkHashAlgorithm.class)));
tmpMap.put(_Fields.PARTITION_TRANSFORMS, new org.apache.thrift.meta_data.FieldMetaData("partition_transforms", 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))));
tmpMap.put(_Fields.WRITER_ASSIGNMENT, new org.apache.thrift.meta_data.FieldMetaData("writer_assignment", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TExternalTableSinkWriterAssignment.class)));
tmpMap.put(_Fields.PAIMON_FIXED_BUCKET_INFO, new org.apache.thrift.meta_data.FieldMetaData("paimon_fixed_bucket_info", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPaimonFixedBucketInfo.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TExternalTableSinkHashPartitionInfo.class, metaDataMap);
}
public TExternalTableSinkHashPartitionInfo() {
}
public TExternalTableSinkHashPartitionInfo(
TExternalTableSinkHashAlgorithm algorithm)
{
this();
this.algorithm = algorithm;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TExternalTableSinkHashPartitionInfo(TExternalTableSinkHashPartitionInfo other) {
if (other.isSetAlgorithm()) {
this.algorithm = other.algorithm;
}
if (other.isSetPartitionTransforms()) {
java.util.List<java.lang.String> __this__partition_transforms = new java.util.ArrayList<java.lang.String>(other.partition_transforms);
this.partition_transforms = __this__partition_transforms;
}
if (other.isSetWriterAssignment()) {
this.writer_assignment = other.writer_assignment;
}
if (other.isSetPaimonFixedBucketInfo()) {
this.paimon_fixed_bucket_info = new TPaimonFixedBucketInfo(other.paimon_fixed_bucket_info);
}
}
public TExternalTableSinkHashPartitionInfo deepCopy() {
return new TExternalTableSinkHashPartitionInfo(this);
}
@Override
public void clear() {
this.algorithm = null;
this.partition_transforms = null;
this.writer_assignment = null;
this.paimon_fixed_bucket_info = null;
}
/**
*
* @see TExternalTableSinkHashAlgorithm
*/
@org.apache.thrift.annotation.Nullable
public TExternalTableSinkHashAlgorithm getAlgorithm() {
return this.algorithm;
}
/**
*
* @see TExternalTableSinkHashAlgorithm
*/
public TExternalTableSinkHashPartitionInfo setAlgorithm(@org.apache.thrift.annotation.Nullable TExternalTableSinkHashAlgorithm algorithm) {
this.algorithm = algorithm;
return this;
}
public void unsetAlgorithm() {
this.algorithm = null;
}
/** Returns true if field algorithm is set (has been assigned a value) and false otherwise */
public boolean isSetAlgorithm() {
return this.algorithm != null;
}
public void setAlgorithmIsSet(boolean value) {
if (!value) {
this.algorithm = null;
}
}
public int getPartitionTransformsSize() {
return (this.partition_transforms == null) ? 0 : this.partition_transforms.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.String> getPartitionTransformsIterator() {
return (this.partition_transforms == null) ? null : this.partition_transforms.iterator();
}
public void addToPartitionTransforms(java.lang.String elem) {
if (this.partition_transforms == null) {
this.partition_transforms = new java.util.ArrayList<java.lang.String>();
}
this.partition_transforms.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.String> getPartitionTransforms() {
return this.partition_transforms;
}
public TExternalTableSinkHashPartitionInfo setPartitionTransforms(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> partition_transforms) {
this.partition_transforms = partition_transforms;
return this;
}
public void unsetPartitionTransforms() {
this.partition_transforms = null;
}
/** Returns true if field partition_transforms is set (has been assigned a value) and false otherwise */
public boolean isSetPartitionTransforms() {
return this.partition_transforms != null;
}
public void setPartitionTransformsIsSet(boolean value) {
if (!value) {
this.partition_transforms = null;
}
}
/**
*
* @see TExternalTableSinkWriterAssignment
*/
@org.apache.thrift.annotation.Nullable
public TExternalTableSinkWriterAssignment getWriterAssignment() {
return this.writer_assignment;
}
/**
*
* @see TExternalTableSinkWriterAssignment
*/
public TExternalTableSinkHashPartitionInfo setWriterAssignment(@org.apache.thrift.annotation.Nullable TExternalTableSinkWriterAssignment writer_assignment) {
this.writer_assignment = writer_assignment;
return this;
}
public void unsetWriterAssignment() {
this.writer_assignment = null;
}
/** Returns true if field writer_assignment is set (has been assigned a value) and false otherwise */
public boolean isSetWriterAssignment() {
return this.writer_assignment != null;
}
public void setWriterAssignmentIsSet(boolean value) {
if (!value) {
this.writer_assignment = null;
}
}
@org.apache.thrift.annotation.Nullable
public TPaimonFixedBucketInfo getPaimonFixedBucketInfo() {
return this.paimon_fixed_bucket_info;
}
public TExternalTableSinkHashPartitionInfo setPaimonFixedBucketInfo(@org.apache.thrift.annotation.Nullable TPaimonFixedBucketInfo paimon_fixed_bucket_info) {
this.paimon_fixed_bucket_info = paimon_fixed_bucket_info;
return this;
}
public void unsetPaimonFixedBucketInfo() {
this.paimon_fixed_bucket_info = null;
}
/** Returns true if field paimon_fixed_bucket_info is set (has been assigned a value) and false otherwise */
public boolean isSetPaimonFixedBucketInfo() {
return this.paimon_fixed_bucket_info != null;
}
public void setPaimonFixedBucketInfoIsSet(boolean value) {
if (!value) {
this.paimon_fixed_bucket_info = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ALGORITHM:
if (value == null) {
unsetAlgorithm();
} else {
setAlgorithm((TExternalTableSinkHashAlgorithm)value);
}
break;
case PARTITION_TRANSFORMS:
if (value == null) {
unsetPartitionTransforms();
} else {
setPartitionTransforms((java.util.List<java.lang.String>)value);
}
break;
case WRITER_ASSIGNMENT:
if (value == null) {
unsetWriterAssignment();
} else {
setWriterAssignment((TExternalTableSinkWriterAssignment)value);
}
break;
case PAIMON_FIXED_BUCKET_INFO:
if (value == null) {
unsetPaimonFixedBucketInfo();
} else {
setPaimonFixedBucketInfo((TPaimonFixedBucketInfo)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ALGORITHM:
return getAlgorithm();
case PARTITION_TRANSFORMS:
return getPartitionTransforms();
case WRITER_ASSIGNMENT:
return getWriterAssignment();
case PAIMON_FIXED_BUCKET_INFO:
return getPaimonFixedBucketInfo();
}
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 ALGORITHM:
return isSetAlgorithm();
case PARTITION_TRANSFORMS:
return isSetPartitionTransforms();
case WRITER_ASSIGNMENT:
return isSetWriterAssignment();
case PAIMON_FIXED_BUCKET_INFO:
return isSetPaimonFixedBucketInfo();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TExternalTableSinkHashPartitionInfo)
return this.equals((TExternalTableSinkHashPartitionInfo)that);
return false;
}
public boolean equals(TExternalTableSinkHashPartitionInfo that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_algorithm = true && this.isSetAlgorithm();
boolean that_present_algorithm = true && that.isSetAlgorithm();
if (this_present_algorithm || that_present_algorithm) {
if (!(this_present_algorithm && that_present_algorithm))
return false;
if (!this.algorithm.equals(that.algorithm))
return false;
}
boolean this_present_partition_transforms = true && this.isSetPartitionTransforms();
boolean that_present_partition_transforms = true && that.isSetPartitionTransforms();
if (this_present_partition_transforms || that_present_partition_transforms) {
if (!(this_present_partition_transforms && that_present_partition_transforms))
return false;
if (!this.partition_transforms.equals(that.partition_transforms))
return false;
}
boolean this_present_writer_assignment = true && this.isSetWriterAssignment();
boolean that_present_writer_assignment = true && that.isSetWriterAssignment();
if (this_present_writer_assignment || that_present_writer_assignment) {
if (!(this_present_writer_assignment && that_present_writer_assignment))
return false;
if (!this.writer_assignment.equals(that.writer_assignment))
return false;
}
boolean this_present_paimon_fixed_bucket_info = true && this.isSetPaimonFixedBucketInfo();
boolean that_present_paimon_fixed_bucket_info = true && that.isSetPaimonFixedBucketInfo();
if (this_present_paimon_fixed_bucket_info || that_present_paimon_fixed_bucket_info) {
if (!(this_present_paimon_fixed_bucket_info && that_present_paimon_fixed_bucket_info))
return false;
if (!this.paimon_fixed_bucket_info.equals(that.paimon_fixed_bucket_info))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAlgorithm()) ? 131071 : 524287);
if (isSetAlgorithm())
hashCode = hashCode * 8191 + algorithm.getValue();
hashCode = hashCode * 8191 + ((isSetPartitionTransforms()) ? 131071 : 524287);
if (isSetPartitionTransforms())
hashCode = hashCode * 8191 + partition_transforms.hashCode();
hashCode = hashCode * 8191 + ((isSetWriterAssignment()) ? 131071 : 524287);
if (isSetWriterAssignment())
hashCode = hashCode * 8191 + writer_assignment.getValue();
hashCode = hashCode * 8191 + ((isSetPaimonFixedBucketInfo()) ? 131071 : 524287);
if (isSetPaimonFixedBucketInfo())
hashCode = hashCode * 8191 + paimon_fixed_bucket_info.hashCode();
return hashCode;
}
@Override
public int compareTo(TExternalTableSinkHashPartitionInfo other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetAlgorithm(), other.isSetAlgorithm());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAlgorithm()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.algorithm, other.algorithm);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPartitionTransforms(), other.isSetPartitionTransforms());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPartitionTransforms()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partition_transforms, other.partition_transforms);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetWriterAssignment(), other.isSetWriterAssignment());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetWriterAssignment()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.writer_assignment, other.writer_assignment);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPaimonFixedBucketInfo(), other.isSetPaimonFixedBucketInfo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPaimonFixedBucketInfo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paimon_fixed_bucket_info, other.paimon_fixed_bucket_info);
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("TExternalTableSinkHashPartitionInfo(");
boolean first = true;
sb.append("algorithm:");
if (this.algorithm == null) {
sb.append("null");
} else {
sb.append(this.algorithm);
}
first = false;
if (isSetPartitionTransforms()) {
if (!first) sb.append(", ");
sb.append("partition_transforms:");
if (this.partition_transforms == null) {
sb.append("null");
} else {
sb.append(this.partition_transforms);
}
first = false;
}
if (isSetWriterAssignment()) {
if (!first) sb.append(", ");
sb.append("writer_assignment:");
if (this.writer_assignment == null) {
sb.append("null");
} else {
sb.append(this.writer_assignment);
}
first = false;
}
if (isSetPaimonFixedBucketInfo()) {
if (!first) sb.append(", ");
sb.append("paimon_fixed_bucket_info:");
if (this.paimon_fixed_bucket_info == null) {
sb.append("null");
} else {
sb.append(this.paimon_fixed_bucket_info);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (algorithm == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'algorithm' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (paimon_fixed_bucket_info != null) {
paimon_fixed_bucket_info.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 {
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 TExternalTableSinkHashPartitionInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TExternalTableSinkHashPartitionInfoStandardScheme getScheme() {
return new TExternalTableSinkHashPartitionInfoStandardScheme();
}
}
private static class TExternalTableSinkHashPartitionInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<TExternalTableSinkHashPartitionInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TExternalTableSinkHashPartitionInfo 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: // ALGORITHM
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.algorithm = org.apache.doris.thrift.TExternalTableSinkHashAlgorithm.findByValue(iprot.readI32());
struct.setAlgorithmIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // PARTITION_TRANSFORMS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list48 = iprot.readListBegin();
struct.partition_transforms = new java.util.ArrayList<java.lang.String>(_list48.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem49;
for (int _i50 = 0; _i50 < _list48.size; ++_i50)
{
_elem49 = iprot.readString();
struct.partition_transforms.add(_elem49);
}
iprot.readListEnd();
}
struct.setPartitionTransformsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // WRITER_ASSIGNMENT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.writer_assignment = org.apache.doris.thrift.TExternalTableSinkWriterAssignment.findByValue(iprot.readI32());
struct.setWriterAssignmentIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // PAIMON_FIXED_BUCKET_INFO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.paimon_fixed_bucket_info = new TPaimonFixedBucketInfo();
struct.paimon_fixed_bucket_info.read(iprot);
struct.setPaimonFixedBucketInfoIsSet(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, TExternalTableSinkHashPartitionInfo struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.algorithm != null) {
oprot.writeFieldBegin(ALGORITHM_FIELD_DESC);
oprot.writeI32(struct.algorithm.getValue());
oprot.writeFieldEnd();
}
if (struct.partition_transforms != null) {
if (struct.isSetPartitionTransforms()) {
oprot.writeFieldBegin(PARTITION_TRANSFORMS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partition_transforms.size()));
for (java.lang.String _iter51 : struct.partition_transforms)
{
oprot.writeString(_iter51);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.writer_assignment != null) {
if (struct.isSetWriterAssignment()) {
oprot.writeFieldBegin(WRITER_ASSIGNMENT_FIELD_DESC);
oprot.writeI32(struct.writer_assignment.getValue());
oprot.writeFieldEnd();
}
}
if (struct.paimon_fixed_bucket_info != null) {
if (struct.isSetPaimonFixedBucketInfo()) {
oprot.writeFieldBegin(PAIMON_FIXED_BUCKET_INFO_FIELD_DESC);
struct.paimon_fixed_bucket_info.write(oprot);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TExternalTableSinkHashPartitionInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TExternalTableSinkHashPartitionInfoTupleScheme getScheme() {
return new TExternalTableSinkHashPartitionInfoTupleScheme();
}
}
private static class TExternalTableSinkHashPartitionInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<TExternalTableSinkHashPartitionInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TExternalTableSinkHashPartitionInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI32(struct.algorithm.getValue());
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetPartitionTransforms()) {
optionals.set(0);
}
if (struct.isSetWriterAssignment()) {
optionals.set(1);
}
if (struct.isSetPaimonFixedBucketInfo()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetPartitionTransforms()) {
{
oprot.writeI32(struct.partition_transforms.size());
for (java.lang.String _iter52 : struct.partition_transforms)
{
oprot.writeString(_iter52);
}
}
}
if (struct.isSetWriterAssignment()) {
oprot.writeI32(struct.writer_assignment.getValue());
}
if (struct.isSetPaimonFixedBucketInfo()) {
struct.paimon_fixed_bucket_info.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TExternalTableSinkHashPartitionInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.algorithm = org.apache.doris.thrift.TExternalTableSinkHashAlgorithm.findByValue(iprot.readI32());
struct.setAlgorithmIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list53 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.partition_transforms = new java.util.ArrayList<java.lang.String>(_list53.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem54;
for (int _i55 = 0; _i55 < _list53.size; ++_i55)
{
_elem54 = iprot.readString();
struct.partition_transforms.add(_elem54);
}
}
struct.setPartitionTransformsIsSet(true);
}
if (incoming.get(1)) {
struct.writer_assignment = org.apache.doris.thrift.TExternalTableSinkWriterAssignment.findByValue(iprot.readI32());
struct.setWriterAssignmentIsSet(true);
}
if (incoming.get(2)) {
struct.paimon_fixed_bucket_info = new TPaimonFixedBucketInfo();
struct.paimon_fixed_bucket_info.read(iprot);
struct.setPaimonFixedBucketInfoIsSet(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();
}
}