TPaimonTableSink.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-07-30")
public class TPaimonTableSink implements org.apache.thrift.TBase<TPaimonTableSink, TPaimonTableSink._Fields>, java.io.Serializable, Cloneable, Comparable<TPaimonTableSink> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPaimonTableSink");
private static final org.apache.thrift.protocol.TField SERIALIZED_TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("serialized_table", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField HADOOP_CONFIG_FIELD_DESC = new org.apache.thrift.protocol.TField("hadoop_config", org.apache.thrift.protocol.TType.MAP, (short)2);
private static final org.apache.thrift.protocol.TField COLUMN_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("column_names", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField BACKEND_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("backend_type", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField WRITE_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("write_mode", org.apache.thrift.protocol.TType.I32, (short)5);
private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transaction_id", org.apache.thrift.protocol.TType.I64, (short)6);
private static final org.apache.thrift.protocol.TField COMMIT_USER_FIELD_DESC = new org.apache.thrift.protocol.TField("commit_user", org.apache.thrift.protocol.TType.STRING, (short)7);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TPaimonTableSinkStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TPaimonTableSinkTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String serialized_table; // optional
public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> hadoop_config; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> column_names; // optional
/**
*
* @see TPaimonWriteBackendType
*/
public @org.apache.thrift.annotation.Nullable TPaimonWriteBackendType backend_type; // optional
/**
*
* @see TPaimonWriteMode
*/
public @org.apache.thrift.annotation.Nullable TPaimonWriteMode write_mode; // optional
public long transaction_id; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String commit_user; // 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 {
SERIALIZED_TABLE((short)1, "serialized_table"),
HADOOP_CONFIG((short)2, "hadoop_config"),
COLUMN_NAMES((short)3, "column_names"),
/**
*
* @see TPaimonWriteBackendType
*/
BACKEND_TYPE((short)4, "backend_type"),
/**
*
* @see TPaimonWriteMode
*/
WRITE_MODE((short)5, "write_mode"),
TRANSACTION_ID((short)6, "transaction_id"),
COMMIT_USER((short)7, "commit_user");
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: // SERIALIZED_TABLE
return SERIALIZED_TABLE;
case 2: // HADOOP_CONFIG
return HADOOP_CONFIG;
case 3: // COLUMN_NAMES
return COLUMN_NAMES;
case 4: // BACKEND_TYPE
return BACKEND_TYPE;
case 5: // WRITE_MODE
return WRITE_MODE;
case 6: // TRANSACTION_ID
return TRANSACTION_ID;
case 7: // COMMIT_USER
return COMMIT_USER;
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 __TRANSACTION_ID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.SERIALIZED_TABLE,_Fields.HADOOP_CONFIG,_Fields.COLUMN_NAMES,_Fields.BACKEND_TYPE,_Fields.WRITE_MODE,_Fields.TRANSACTION_ID,_Fields.COMMIT_USER};
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.SERIALIZED_TABLE, new org.apache.thrift.meta_data.FieldMetaData("serialized_table", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.HADOOP_CONFIG, new org.apache.thrift.meta_data.FieldMetaData("hadoop_config", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.COLUMN_NAMES, new org.apache.thrift.meta_data.FieldMetaData("column_names", 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.BACKEND_TYPE, new org.apache.thrift.meta_data.FieldMetaData("backend_type", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TPaimonWriteBackendType.class)));
tmpMap.put(_Fields.WRITE_MODE, new org.apache.thrift.meta_data.FieldMetaData("write_mode", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TPaimonWriteMode.class)));
tmpMap.put(_Fields.TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("transaction_id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.COMMIT_USER, new org.apache.thrift.meta_data.FieldMetaData("commit_user", 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(TPaimonTableSink.class, metaDataMap);
}
public TPaimonTableSink() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TPaimonTableSink(TPaimonTableSink other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetSerializedTable()) {
this.serialized_table = other.serialized_table;
}
if (other.isSetHadoopConfig()) {
java.util.Map<java.lang.String,java.lang.String> __this__hadoop_config = new java.util.HashMap<java.lang.String,java.lang.String>(other.hadoop_config);
this.hadoop_config = __this__hadoop_config;
}
if (other.isSetColumnNames()) {
java.util.List<java.lang.String> __this__column_names = new java.util.ArrayList<java.lang.String>(other.column_names);
this.column_names = __this__column_names;
}
if (other.isSetBackendType()) {
this.backend_type = other.backend_type;
}
if (other.isSetWriteMode()) {
this.write_mode = other.write_mode;
}
this.transaction_id = other.transaction_id;
if (other.isSetCommitUser()) {
this.commit_user = other.commit_user;
}
}
public TPaimonTableSink deepCopy() {
return new TPaimonTableSink(this);
}
@Override
public void clear() {
this.serialized_table = null;
this.hadoop_config = null;
this.column_names = null;
this.backend_type = null;
this.write_mode = null;
setTransactionIdIsSet(false);
this.transaction_id = 0;
this.commit_user = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getSerializedTable() {
return this.serialized_table;
}
public TPaimonTableSink setSerializedTable(@org.apache.thrift.annotation.Nullable java.lang.String serialized_table) {
this.serialized_table = serialized_table;
return this;
}
public void unsetSerializedTable() {
this.serialized_table = null;
}
/** Returns true if field serialized_table is set (has been assigned a value) and false otherwise */
public boolean isSetSerializedTable() {
return this.serialized_table != null;
}
public void setSerializedTableIsSet(boolean value) {
if (!value) {
this.serialized_table = null;
}
}
public int getHadoopConfigSize() {
return (this.hadoop_config == null) ? 0 : this.hadoop_config.size();
}
public void putToHadoopConfig(java.lang.String key, java.lang.String val) {
if (this.hadoop_config == null) {
this.hadoop_config = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.hadoop_config.put(key, val);
}
@org.apache.thrift.annotation.Nullable
public java.util.Map<java.lang.String,java.lang.String> getHadoopConfig() {
return this.hadoop_config;
}
public TPaimonTableSink setHadoopConfig(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> hadoop_config) {
this.hadoop_config = hadoop_config;
return this;
}
public void unsetHadoopConfig() {
this.hadoop_config = null;
}
/** Returns true if field hadoop_config is set (has been assigned a value) and false otherwise */
public boolean isSetHadoopConfig() {
return this.hadoop_config != null;
}
public void setHadoopConfigIsSet(boolean value) {
if (!value) {
this.hadoop_config = null;
}
}
public int getColumnNamesSize() {
return (this.column_names == null) ? 0 : this.column_names.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.String> getColumnNamesIterator() {
return (this.column_names == null) ? null : this.column_names.iterator();
}
public void addToColumnNames(java.lang.String elem) {
if (this.column_names == null) {
this.column_names = new java.util.ArrayList<java.lang.String>();
}
this.column_names.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.String> getColumnNames() {
return this.column_names;
}
public TPaimonTableSink setColumnNames(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> column_names) {
this.column_names = column_names;
return this;
}
public void unsetColumnNames() {
this.column_names = null;
}
/** Returns true if field column_names is set (has been assigned a value) and false otherwise */
public boolean isSetColumnNames() {
return this.column_names != null;
}
public void setColumnNamesIsSet(boolean value) {
if (!value) {
this.column_names = null;
}
}
/**
*
* @see TPaimonWriteBackendType
*/
@org.apache.thrift.annotation.Nullable
public TPaimonWriteBackendType getBackendType() {
return this.backend_type;
}
/**
*
* @see TPaimonWriteBackendType
*/
public TPaimonTableSink setBackendType(@org.apache.thrift.annotation.Nullable TPaimonWriteBackendType backend_type) {
this.backend_type = backend_type;
return this;
}
public void unsetBackendType() {
this.backend_type = null;
}
/** Returns true if field backend_type is set (has been assigned a value) and false otherwise */
public boolean isSetBackendType() {
return this.backend_type != null;
}
public void setBackendTypeIsSet(boolean value) {
if (!value) {
this.backend_type = null;
}
}
/**
*
* @see TPaimonWriteMode
*/
@org.apache.thrift.annotation.Nullable
public TPaimonWriteMode getWriteMode() {
return this.write_mode;
}
/**
*
* @see TPaimonWriteMode
*/
public TPaimonTableSink setWriteMode(@org.apache.thrift.annotation.Nullable TPaimonWriteMode write_mode) {
this.write_mode = write_mode;
return this;
}
public void unsetWriteMode() {
this.write_mode = null;
}
/** Returns true if field write_mode is set (has been assigned a value) and false otherwise */
public boolean isSetWriteMode() {
return this.write_mode != null;
}
public void setWriteModeIsSet(boolean value) {
if (!value) {
this.write_mode = null;
}
}
public long getTransactionId() {
return this.transaction_id;
}
public TPaimonTableSink setTransactionId(long transaction_id) {
this.transaction_id = transaction_id;
setTransactionIdIsSet(true);
return this;
}
public void unsetTransactionId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTION_ID_ISSET_ID);
}
/** Returns true if field transaction_id is set (has been assigned a value) and false otherwise */
public boolean isSetTransactionId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTION_ID_ISSET_ID);
}
public void setTransactionIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTION_ID_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getCommitUser() {
return this.commit_user;
}
public TPaimonTableSink setCommitUser(@org.apache.thrift.annotation.Nullable java.lang.String commit_user) {
this.commit_user = commit_user;
return this;
}
public void unsetCommitUser() {
this.commit_user = null;
}
/** Returns true if field commit_user is set (has been assigned a value) and false otherwise */
public boolean isSetCommitUser() {
return this.commit_user != null;
}
public void setCommitUserIsSet(boolean value) {
if (!value) {
this.commit_user = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SERIALIZED_TABLE:
if (value == null) {
unsetSerializedTable();
} else {
setSerializedTable((java.lang.String)value);
}
break;
case HADOOP_CONFIG:
if (value == null) {
unsetHadoopConfig();
} else {
setHadoopConfig((java.util.Map<java.lang.String,java.lang.String>)value);
}
break;
case COLUMN_NAMES:
if (value == null) {
unsetColumnNames();
} else {
setColumnNames((java.util.List<java.lang.String>)value);
}
break;
case BACKEND_TYPE:
if (value == null) {
unsetBackendType();
} else {
setBackendType((TPaimonWriteBackendType)value);
}
break;
case WRITE_MODE:
if (value == null) {
unsetWriteMode();
} else {
setWriteMode((TPaimonWriteMode)value);
}
break;
case TRANSACTION_ID:
if (value == null) {
unsetTransactionId();
} else {
setTransactionId((java.lang.Long)value);
}
break;
case COMMIT_USER:
if (value == null) {
unsetCommitUser();
} else {
setCommitUser((java.lang.String)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SERIALIZED_TABLE:
return getSerializedTable();
case HADOOP_CONFIG:
return getHadoopConfig();
case COLUMN_NAMES:
return getColumnNames();
case BACKEND_TYPE:
return getBackendType();
case WRITE_MODE:
return getWriteMode();
case TRANSACTION_ID:
return getTransactionId();
case COMMIT_USER:
return getCommitUser();
}
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 SERIALIZED_TABLE:
return isSetSerializedTable();
case HADOOP_CONFIG:
return isSetHadoopConfig();
case COLUMN_NAMES:
return isSetColumnNames();
case BACKEND_TYPE:
return isSetBackendType();
case WRITE_MODE:
return isSetWriteMode();
case TRANSACTION_ID:
return isSetTransactionId();
case COMMIT_USER:
return isSetCommitUser();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TPaimonTableSink)
return this.equals((TPaimonTableSink)that);
return false;
}
public boolean equals(TPaimonTableSink that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_serialized_table = true && this.isSetSerializedTable();
boolean that_present_serialized_table = true && that.isSetSerializedTable();
if (this_present_serialized_table || that_present_serialized_table) {
if (!(this_present_serialized_table && that_present_serialized_table))
return false;
if (!this.serialized_table.equals(that.serialized_table))
return false;
}
boolean this_present_hadoop_config = true && this.isSetHadoopConfig();
boolean that_present_hadoop_config = true && that.isSetHadoopConfig();
if (this_present_hadoop_config || that_present_hadoop_config) {
if (!(this_present_hadoop_config && that_present_hadoop_config))
return false;
if (!this.hadoop_config.equals(that.hadoop_config))
return false;
}
boolean this_present_column_names = true && this.isSetColumnNames();
boolean that_present_column_names = true && that.isSetColumnNames();
if (this_present_column_names || that_present_column_names) {
if (!(this_present_column_names && that_present_column_names))
return false;
if (!this.column_names.equals(that.column_names))
return false;
}
boolean this_present_backend_type = true && this.isSetBackendType();
boolean that_present_backend_type = true && that.isSetBackendType();
if (this_present_backend_type || that_present_backend_type) {
if (!(this_present_backend_type && that_present_backend_type))
return false;
if (!this.backend_type.equals(that.backend_type))
return false;
}
boolean this_present_write_mode = true && this.isSetWriteMode();
boolean that_present_write_mode = true && that.isSetWriteMode();
if (this_present_write_mode || that_present_write_mode) {
if (!(this_present_write_mode && that_present_write_mode))
return false;
if (!this.write_mode.equals(that.write_mode))
return false;
}
boolean this_present_transaction_id = true && this.isSetTransactionId();
boolean that_present_transaction_id = true && that.isSetTransactionId();
if (this_present_transaction_id || that_present_transaction_id) {
if (!(this_present_transaction_id && that_present_transaction_id))
return false;
if (this.transaction_id != that.transaction_id)
return false;
}
boolean this_present_commit_user = true && this.isSetCommitUser();
boolean that_present_commit_user = true && that.isSetCommitUser();
if (this_present_commit_user || that_present_commit_user) {
if (!(this_present_commit_user && that_present_commit_user))
return false;
if (!this.commit_user.equals(that.commit_user))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSerializedTable()) ? 131071 : 524287);
if (isSetSerializedTable())
hashCode = hashCode * 8191 + serialized_table.hashCode();
hashCode = hashCode * 8191 + ((isSetHadoopConfig()) ? 131071 : 524287);
if (isSetHadoopConfig())
hashCode = hashCode * 8191 + hadoop_config.hashCode();
hashCode = hashCode * 8191 + ((isSetColumnNames()) ? 131071 : 524287);
if (isSetColumnNames())
hashCode = hashCode * 8191 + column_names.hashCode();
hashCode = hashCode * 8191 + ((isSetBackendType()) ? 131071 : 524287);
if (isSetBackendType())
hashCode = hashCode * 8191 + backend_type.getValue();
hashCode = hashCode * 8191 + ((isSetWriteMode()) ? 131071 : 524287);
if (isSetWriteMode())
hashCode = hashCode * 8191 + write_mode.getValue();
hashCode = hashCode * 8191 + ((isSetTransactionId()) ? 131071 : 524287);
if (isSetTransactionId())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transaction_id);
hashCode = hashCode * 8191 + ((isSetCommitUser()) ? 131071 : 524287);
if (isSetCommitUser())
hashCode = hashCode * 8191 + commit_user.hashCode();
return hashCode;
}
@Override
public int compareTo(TPaimonTableSink other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetSerializedTable(), other.isSetSerializedTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSerializedTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialized_table, other.serialized_table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetHadoopConfig(), other.isSetHadoopConfig());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHadoopConfig()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hadoop_config, other.hadoop_config);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnNames(), other.isSetColumnNames());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnNames()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_names, other.column_names);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetBackendType(), other.isSetBackendType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBackendType()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.backend_type, other.backend_type);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetWriteMode(), other.isSetWriteMode());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetWriteMode()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.write_mode, other.write_mode);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTransactionId(), other.isSetTransactionId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTransactionId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transaction_id, other.transaction_id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCommitUser(), other.isSetCommitUser());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCommitUser()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.commit_user, other.commit_user);
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("TPaimonTableSink(");
boolean first = true;
if (isSetSerializedTable()) {
sb.append("serialized_table:");
if (this.serialized_table == null) {
sb.append("null");
} else {
sb.append(this.serialized_table);
}
first = false;
}
if (isSetHadoopConfig()) {
if (!first) sb.append(", ");
sb.append("hadoop_config:");
if (this.hadoop_config == null) {
sb.append("null");
} else {
sb.append(this.hadoop_config);
}
first = false;
}
if (isSetColumnNames()) {
if (!first) sb.append(", ");
sb.append("column_names:");
if (this.column_names == null) {
sb.append("null");
} else {
sb.append(this.column_names);
}
first = false;
}
if (isSetBackendType()) {
if (!first) sb.append(", ");
sb.append("backend_type:");
if (this.backend_type == null) {
sb.append("null");
} else {
sb.append(this.backend_type);
}
first = false;
}
if (isSetWriteMode()) {
if (!first) sb.append(", ");
sb.append("write_mode:");
if (this.write_mode == null) {
sb.append("null");
} else {
sb.append(this.write_mode);
}
first = false;
}
if (isSetTransactionId()) {
if (!first) sb.append(", ");
sb.append("transaction_id:");
sb.append(this.transaction_id);
first = false;
}
if (isSetCommitUser()) {
if (!first) sb.append(", ");
sb.append("commit_user:");
if (this.commit_user == null) {
sb.append("null");
} else {
sb.append(this.commit_user);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class TPaimonTableSinkStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TPaimonTableSinkStandardScheme getScheme() {
return new TPaimonTableSinkStandardScheme();
}
}
private static class TPaimonTableSinkStandardScheme extends org.apache.thrift.scheme.StandardScheme<TPaimonTableSink> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TPaimonTableSink 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: // SERIALIZED_TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.serialized_table = iprot.readString();
struct.setSerializedTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // HADOOP_CONFIG
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map522 = iprot.readMapBegin();
struct.hadoop_config = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map522.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key523;
@org.apache.thrift.annotation.Nullable java.lang.String _val524;
for (int _i525 = 0; _i525 < _map522.size; ++_i525)
{
_key523 = iprot.readString();
_val524 = iprot.readString();
struct.hadoop_config.put(_key523, _val524);
}
iprot.readMapEnd();
}
struct.setHadoopConfigIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // COLUMN_NAMES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list526 = iprot.readListBegin();
struct.column_names = new java.util.ArrayList<java.lang.String>(_list526.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem527;
for (int _i528 = 0; _i528 < _list526.size; ++_i528)
{
_elem527 = iprot.readString();
struct.column_names.add(_elem527);
}
iprot.readListEnd();
}
struct.setColumnNamesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // BACKEND_TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.backend_type = org.apache.doris.thrift.TPaimonWriteBackendType.findByValue(iprot.readI32());
struct.setBackendTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // WRITE_MODE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.write_mode = org.apache.doris.thrift.TPaimonWriteMode.findByValue(iprot.readI32());
struct.setWriteModeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // TRANSACTION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.transaction_id = iprot.readI64();
struct.setTransactionIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // COMMIT_USER
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.commit_user = iprot.readString();
struct.setCommitUserIsSet(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, TPaimonTableSink struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.serialized_table != null) {
if (struct.isSetSerializedTable()) {
oprot.writeFieldBegin(SERIALIZED_TABLE_FIELD_DESC);
oprot.writeString(struct.serialized_table);
oprot.writeFieldEnd();
}
}
if (struct.hadoop_config != null) {
if (struct.isSetHadoopConfig()) {
oprot.writeFieldBegin(HADOOP_CONFIG_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.hadoop_config.size()));
for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter529 : struct.hadoop_config.entrySet())
{
oprot.writeString(_iter529.getKey());
oprot.writeString(_iter529.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.column_names != null) {
if (struct.isSetColumnNames()) {
oprot.writeFieldBegin(COLUMN_NAMES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.column_names.size()));
for (java.lang.String _iter530 : struct.column_names)
{
oprot.writeString(_iter530);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.backend_type != null) {
if (struct.isSetBackendType()) {
oprot.writeFieldBegin(BACKEND_TYPE_FIELD_DESC);
oprot.writeI32(struct.backend_type.getValue());
oprot.writeFieldEnd();
}
}
if (struct.write_mode != null) {
if (struct.isSetWriteMode()) {
oprot.writeFieldBegin(WRITE_MODE_FIELD_DESC);
oprot.writeI32(struct.write_mode.getValue());
oprot.writeFieldEnd();
}
}
if (struct.isSetTransactionId()) {
oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
oprot.writeI64(struct.transaction_id);
oprot.writeFieldEnd();
}
if (struct.commit_user != null) {
if (struct.isSetCommitUser()) {
oprot.writeFieldBegin(COMMIT_USER_FIELD_DESC);
oprot.writeString(struct.commit_user);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TPaimonTableSinkTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TPaimonTableSinkTupleScheme getScheme() {
return new TPaimonTableSinkTupleScheme();
}
}
private static class TPaimonTableSinkTupleScheme extends org.apache.thrift.scheme.TupleScheme<TPaimonTableSink> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TPaimonTableSink 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.isSetSerializedTable()) {
optionals.set(0);
}
if (struct.isSetHadoopConfig()) {
optionals.set(1);
}
if (struct.isSetColumnNames()) {
optionals.set(2);
}
if (struct.isSetBackendType()) {
optionals.set(3);
}
if (struct.isSetWriteMode()) {
optionals.set(4);
}
if (struct.isSetTransactionId()) {
optionals.set(5);
}
if (struct.isSetCommitUser()) {
optionals.set(6);
}
oprot.writeBitSet(optionals, 7);
if (struct.isSetSerializedTable()) {
oprot.writeString(struct.serialized_table);
}
if (struct.isSetHadoopConfig()) {
{
oprot.writeI32(struct.hadoop_config.size());
for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter531 : struct.hadoop_config.entrySet())
{
oprot.writeString(_iter531.getKey());
oprot.writeString(_iter531.getValue());
}
}
}
if (struct.isSetColumnNames()) {
{
oprot.writeI32(struct.column_names.size());
for (java.lang.String _iter532 : struct.column_names)
{
oprot.writeString(_iter532);
}
}
}
if (struct.isSetBackendType()) {
oprot.writeI32(struct.backend_type.getValue());
}
if (struct.isSetWriteMode()) {
oprot.writeI32(struct.write_mode.getValue());
}
if (struct.isSetTransactionId()) {
oprot.writeI64(struct.transaction_id);
}
if (struct.isSetCommitUser()) {
oprot.writeString(struct.commit_user);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TPaimonTableSink struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(7);
if (incoming.get(0)) {
struct.serialized_table = iprot.readString();
struct.setSerializedTableIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TMap _map533 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING);
struct.hadoop_config = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map533.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key534;
@org.apache.thrift.annotation.Nullable java.lang.String _val535;
for (int _i536 = 0; _i536 < _map533.size; ++_i536)
{
_key534 = iprot.readString();
_val535 = iprot.readString();
struct.hadoop_config.put(_key534, _val535);
}
}
struct.setHadoopConfigIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list537 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.column_names = new java.util.ArrayList<java.lang.String>(_list537.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem538;
for (int _i539 = 0; _i539 < _list537.size; ++_i539)
{
_elem538 = iprot.readString();
struct.column_names.add(_elem538);
}
}
struct.setColumnNamesIsSet(true);
}
if (incoming.get(3)) {
struct.backend_type = org.apache.doris.thrift.TPaimonWriteBackendType.findByValue(iprot.readI32());
struct.setBackendTypeIsSet(true);
}
if (incoming.get(4)) {
struct.write_mode = org.apache.doris.thrift.TPaimonWriteMode.findByValue(iprot.readI32());
struct.setWriteModeIsSet(true);
}
if (incoming.get(5)) {
struct.transaction_id = iprot.readI64();
struct.setTransactionIdIsSet(true);
}
if (incoming.get(6)) {
struct.commit_user = iprot.readString();
struct.setCommitUserIsSet(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();
}
}