TDataSink.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 TDataSink implements org.apache.thrift.TBase<TDataSink, TDataSink._Fields>, java.io.Serializable, Cloneable, Comparable<TDataSink> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TDataSink");
private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField STREAM_SINK_FIELD_DESC = new org.apache.thrift.protocol.TField("stream_sink", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField RESULT_SINK_FIELD_DESC = new org.apache.thrift.protocol.TField("result_sink", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField MYSQL_TABLE_SINK_FIELD_DESC = new org.apache.thrift.protocol.TField("mysql_table_sink", org.apache.thrift.protocol.TType.STRUCT, (short)5);
private static final org.apache.thrift.protocol.TField EXPORT_SINK_FIELD_DESC = new org.apache.thrift.protocol.TField("export_sink", org.apache.thrift.protocol.TType.STRUCT, (short)6);
private static final org.apache.thrift.protocol.TField OLAP_TABLE_SINK_FIELD_DESC = new org.apache.thrift.protocol.TField("olap_table_sink", org.apache.thrift.protocol.TType.STRUCT, (short)7);
private static final org.apache.thrift.protocol.TField MEMORY_SCRATCH_SINK_FIELD_DESC = new org.apache.thrift.protocol.TField("memory_scratch_sink", org.apache.thrift.protocol.TType.STRUCT, (short)8);
private static final org.apache.thrift.protocol.TField ODBC_TABLE_SINK_FIELD_DESC = new org.apache.thrift.protocol.TField("odbc_table_sink", org.apache.thrift.protocol.TType.STRUCT, (short)9);
private static final org.apache.thrift.protocol.TField RESULT_FILE_SINK_FIELD_DESC = new org.apache.thrift.protocol.TField("result_file_sink", org.apache.thrift.protocol.TType.STRUCT, (short)10);
private static final org.apache.thrift.protocol.TField JDBC_TABLE_SINK_FIELD_DESC = new org.apache.thrift.protocol.TField("jdbc_table_sink", org.apache.thrift.protocol.TType.STRUCT, (short)11);
private static final org.apache.thrift.protocol.TField MULTI_CAST_STREAM_SINK_FIELD_DESC = new org.apache.thrift.protocol.TField("multi_cast_stream_sink", org.apache.thrift.protocol.TType.STRUCT, (short)12);
private static final org.apache.thrift.protocol.TField HIVE_TABLE_SINK_FIELD_DESC = new org.apache.thrift.protocol.TField("hive_table_sink", org.apache.thrift.protocol.TType.STRUCT, (short)13);
private static final org.apache.thrift.protocol.TField ICEBERG_TABLE_SINK_FIELD_DESC = new org.apache.thrift.protocol.TField("iceberg_table_sink", org.apache.thrift.protocol.TType.STRUCT, (short)14);
private static final org.apache.thrift.protocol.TField DICTIONARY_SINK_FIELD_DESC = new org.apache.thrift.protocol.TField("dictionary_sink", org.apache.thrift.protocol.TType.STRUCT, (short)15);
private static final org.apache.thrift.protocol.TField BLACKHOLE_SINK_FIELD_DESC = new org.apache.thrift.protocol.TField("blackhole_sink", org.apache.thrift.protocol.TType.STRUCT, (short)16);
private static final org.apache.thrift.protocol.TField TVF_TABLE_SINK_FIELD_DESC = new org.apache.thrift.protocol.TField("tvf_table_sink", org.apache.thrift.protocol.TType.STRUCT, (short)17);
private static final org.apache.thrift.protocol.TField MAX_COMPUTE_TABLE_SINK_FIELD_DESC = new org.apache.thrift.protocol.TField("max_compute_table_sink", org.apache.thrift.protocol.TType.STRUCT, (short)18);
private static final org.apache.thrift.protocol.TField ICEBERG_DELETE_SINK_FIELD_DESC = new org.apache.thrift.protocol.TField("iceberg_delete_sink", org.apache.thrift.protocol.TType.STRUCT, (short)19);
private static final org.apache.thrift.protocol.TField ICEBERG_MERGE_SINK_FIELD_DESC = new org.apache.thrift.protocol.TField("iceberg_merge_sink", org.apache.thrift.protocol.TType.STRUCT, (short)20);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TDataSinkStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TDataSinkTupleSchemeFactory();
/**
*
* @see TDataSinkType
*/
public @org.apache.thrift.annotation.Nullable TDataSinkType type; // required
public @org.apache.thrift.annotation.Nullable TDataStreamSink stream_sink; // optional
public @org.apache.thrift.annotation.Nullable TResultSink result_sink; // optional
public @org.apache.thrift.annotation.Nullable TMysqlTableSink mysql_table_sink; // optional
public @org.apache.thrift.annotation.Nullable TExportSink export_sink; // optional
public @org.apache.thrift.annotation.Nullable TOlapTableSink olap_table_sink; // optional
public @org.apache.thrift.annotation.Nullable TMemoryScratchSink memory_scratch_sink; // optional
public @org.apache.thrift.annotation.Nullable TOdbcTableSink odbc_table_sink; // optional
public @org.apache.thrift.annotation.Nullable TResultFileSink result_file_sink; // optional
public @org.apache.thrift.annotation.Nullable TJdbcTableSink jdbc_table_sink; // optional
public @org.apache.thrift.annotation.Nullable TMultiCastDataStreamSink multi_cast_stream_sink; // optional
public @org.apache.thrift.annotation.Nullable THiveTableSink hive_table_sink; // optional
public @org.apache.thrift.annotation.Nullable TIcebergTableSink iceberg_table_sink; // optional
public @org.apache.thrift.annotation.Nullable TDictionarySink dictionary_sink; // optional
public @org.apache.thrift.annotation.Nullable TBlackholeSink blackhole_sink; // optional
public @org.apache.thrift.annotation.Nullable TTVFTableSink tvf_table_sink; // optional
public @org.apache.thrift.annotation.Nullable TMaxComputeTableSink max_compute_table_sink; // optional
public @org.apache.thrift.annotation.Nullable TIcebergDeleteSink iceberg_delete_sink; // optional
public @org.apache.thrift.annotation.Nullable TIcebergMergeSink iceberg_merge_sink; // 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 TDataSinkType
*/
TYPE((short)1, "type"),
STREAM_SINK((short)2, "stream_sink"),
RESULT_SINK((short)3, "result_sink"),
MYSQL_TABLE_SINK((short)5, "mysql_table_sink"),
EXPORT_SINK((short)6, "export_sink"),
OLAP_TABLE_SINK((short)7, "olap_table_sink"),
MEMORY_SCRATCH_SINK((short)8, "memory_scratch_sink"),
ODBC_TABLE_SINK((short)9, "odbc_table_sink"),
RESULT_FILE_SINK((short)10, "result_file_sink"),
JDBC_TABLE_SINK((short)11, "jdbc_table_sink"),
MULTI_CAST_STREAM_SINK((short)12, "multi_cast_stream_sink"),
HIVE_TABLE_SINK((short)13, "hive_table_sink"),
ICEBERG_TABLE_SINK((short)14, "iceberg_table_sink"),
DICTIONARY_SINK((short)15, "dictionary_sink"),
BLACKHOLE_SINK((short)16, "blackhole_sink"),
TVF_TABLE_SINK((short)17, "tvf_table_sink"),
MAX_COMPUTE_TABLE_SINK((short)18, "max_compute_table_sink"),
ICEBERG_DELETE_SINK((short)19, "iceberg_delete_sink"),
ICEBERG_MERGE_SINK((short)20, "iceberg_merge_sink");
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: // TYPE
return TYPE;
case 2: // STREAM_SINK
return STREAM_SINK;
case 3: // RESULT_SINK
return RESULT_SINK;
case 5: // MYSQL_TABLE_SINK
return MYSQL_TABLE_SINK;
case 6: // EXPORT_SINK
return EXPORT_SINK;
case 7: // OLAP_TABLE_SINK
return OLAP_TABLE_SINK;
case 8: // MEMORY_SCRATCH_SINK
return MEMORY_SCRATCH_SINK;
case 9: // ODBC_TABLE_SINK
return ODBC_TABLE_SINK;
case 10: // RESULT_FILE_SINK
return RESULT_FILE_SINK;
case 11: // JDBC_TABLE_SINK
return JDBC_TABLE_SINK;
case 12: // MULTI_CAST_STREAM_SINK
return MULTI_CAST_STREAM_SINK;
case 13: // HIVE_TABLE_SINK
return HIVE_TABLE_SINK;
case 14: // ICEBERG_TABLE_SINK
return ICEBERG_TABLE_SINK;
case 15: // DICTIONARY_SINK
return DICTIONARY_SINK;
case 16: // BLACKHOLE_SINK
return BLACKHOLE_SINK;
case 17: // TVF_TABLE_SINK
return TVF_TABLE_SINK;
case 18: // MAX_COMPUTE_TABLE_SINK
return MAX_COMPUTE_TABLE_SINK;
case 19: // ICEBERG_DELETE_SINK
return ICEBERG_DELETE_SINK;
case 20: // ICEBERG_MERGE_SINK
return ICEBERG_MERGE_SINK;
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.STREAM_SINK,_Fields.RESULT_SINK,_Fields.MYSQL_TABLE_SINK,_Fields.EXPORT_SINK,_Fields.OLAP_TABLE_SINK,_Fields.MEMORY_SCRATCH_SINK,_Fields.ODBC_TABLE_SINK,_Fields.RESULT_FILE_SINK,_Fields.JDBC_TABLE_SINK,_Fields.MULTI_CAST_STREAM_SINK,_Fields.HIVE_TABLE_SINK,_Fields.ICEBERG_TABLE_SINK,_Fields.DICTIONARY_SINK,_Fields.BLACKHOLE_SINK,_Fields.TVF_TABLE_SINK,_Fields.MAX_COMPUTE_TABLE_SINK,_Fields.ICEBERG_DELETE_SINK,_Fields.ICEBERG_MERGE_SINK};
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.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TDataSinkType.class)));
tmpMap.put(_Fields.STREAM_SINK, new org.apache.thrift.meta_data.FieldMetaData("stream_sink", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDataStreamSink.class)));
tmpMap.put(_Fields.RESULT_SINK, new org.apache.thrift.meta_data.FieldMetaData("result_sink", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResultSink.class)));
tmpMap.put(_Fields.MYSQL_TABLE_SINK, new org.apache.thrift.meta_data.FieldMetaData("mysql_table_sink", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TMysqlTableSink.class)));
tmpMap.put(_Fields.EXPORT_SINK, new org.apache.thrift.meta_data.FieldMetaData("export_sink", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TExportSink.class)));
tmpMap.put(_Fields.OLAP_TABLE_SINK, new org.apache.thrift.meta_data.FieldMetaData("olap_table_sink", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TOlapTableSink.class)));
tmpMap.put(_Fields.MEMORY_SCRATCH_SINK, new org.apache.thrift.meta_data.FieldMetaData("memory_scratch_sink", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TMemoryScratchSink.class)));
tmpMap.put(_Fields.ODBC_TABLE_SINK, new org.apache.thrift.meta_data.FieldMetaData("odbc_table_sink", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TOdbcTableSink.class)));
tmpMap.put(_Fields.RESULT_FILE_SINK, new org.apache.thrift.meta_data.FieldMetaData("result_file_sink", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResultFileSink.class)));
tmpMap.put(_Fields.JDBC_TABLE_SINK, new org.apache.thrift.meta_data.FieldMetaData("jdbc_table_sink", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TJdbcTableSink.class)));
tmpMap.put(_Fields.MULTI_CAST_STREAM_SINK, new org.apache.thrift.meta_data.FieldMetaData("multi_cast_stream_sink", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TMultiCastDataStreamSink.class)));
tmpMap.put(_Fields.HIVE_TABLE_SINK, new org.apache.thrift.meta_data.FieldMetaData("hive_table_sink", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THiveTableSink.class)));
tmpMap.put(_Fields.ICEBERG_TABLE_SINK, new org.apache.thrift.meta_data.FieldMetaData("iceberg_table_sink", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TIcebergTableSink.class)));
tmpMap.put(_Fields.DICTIONARY_SINK, new org.apache.thrift.meta_data.FieldMetaData("dictionary_sink", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDictionarySink.class)));
tmpMap.put(_Fields.BLACKHOLE_SINK, new org.apache.thrift.meta_data.FieldMetaData("blackhole_sink", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TBlackholeSink.class)));
tmpMap.put(_Fields.TVF_TABLE_SINK, new org.apache.thrift.meta_data.FieldMetaData("tvf_table_sink", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTVFTableSink.class)));
tmpMap.put(_Fields.MAX_COMPUTE_TABLE_SINK, new org.apache.thrift.meta_data.FieldMetaData("max_compute_table_sink", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TMaxComputeTableSink.class)));
tmpMap.put(_Fields.ICEBERG_DELETE_SINK, new org.apache.thrift.meta_data.FieldMetaData("iceberg_delete_sink", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TIcebergDeleteSink.class)));
tmpMap.put(_Fields.ICEBERG_MERGE_SINK, new org.apache.thrift.meta_data.FieldMetaData("iceberg_merge_sink", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TIcebergMergeSink.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TDataSink.class, metaDataMap);
}
public TDataSink() {
}
public TDataSink(
TDataSinkType type)
{
this();
this.type = type;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TDataSink(TDataSink other) {
if (other.isSetType()) {
this.type = other.type;
}
if (other.isSetStreamSink()) {
this.stream_sink = new TDataStreamSink(other.stream_sink);
}
if (other.isSetResultSink()) {
this.result_sink = new TResultSink(other.result_sink);
}
if (other.isSetMysqlTableSink()) {
this.mysql_table_sink = new TMysqlTableSink(other.mysql_table_sink);
}
if (other.isSetExportSink()) {
this.export_sink = new TExportSink(other.export_sink);
}
if (other.isSetOlapTableSink()) {
this.olap_table_sink = new TOlapTableSink(other.olap_table_sink);
}
if (other.isSetMemoryScratchSink()) {
this.memory_scratch_sink = new TMemoryScratchSink(other.memory_scratch_sink);
}
if (other.isSetOdbcTableSink()) {
this.odbc_table_sink = new TOdbcTableSink(other.odbc_table_sink);
}
if (other.isSetResultFileSink()) {
this.result_file_sink = new TResultFileSink(other.result_file_sink);
}
if (other.isSetJdbcTableSink()) {
this.jdbc_table_sink = new TJdbcTableSink(other.jdbc_table_sink);
}
if (other.isSetMultiCastStreamSink()) {
this.multi_cast_stream_sink = new TMultiCastDataStreamSink(other.multi_cast_stream_sink);
}
if (other.isSetHiveTableSink()) {
this.hive_table_sink = new THiveTableSink(other.hive_table_sink);
}
if (other.isSetIcebergTableSink()) {
this.iceberg_table_sink = new TIcebergTableSink(other.iceberg_table_sink);
}
if (other.isSetDictionarySink()) {
this.dictionary_sink = new TDictionarySink(other.dictionary_sink);
}
if (other.isSetBlackholeSink()) {
this.blackhole_sink = new TBlackholeSink(other.blackhole_sink);
}
if (other.isSetTvfTableSink()) {
this.tvf_table_sink = new TTVFTableSink(other.tvf_table_sink);
}
if (other.isSetMaxComputeTableSink()) {
this.max_compute_table_sink = new TMaxComputeTableSink(other.max_compute_table_sink);
}
if (other.isSetIcebergDeleteSink()) {
this.iceberg_delete_sink = new TIcebergDeleteSink(other.iceberg_delete_sink);
}
if (other.isSetIcebergMergeSink()) {
this.iceberg_merge_sink = new TIcebergMergeSink(other.iceberg_merge_sink);
}
}
public TDataSink deepCopy() {
return new TDataSink(this);
}
@Override
public void clear() {
this.type = null;
this.stream_sink = null;
this.result_sink = null;
this.mysql_table_sink = null;
this.export_sink = null;
this.olap_table_sink = null;
this.memory_scratch_sink = null;
this.odbc_table_sink = null;
this.result_file_sink = null;
this.jdbc_table_sink = null;
this.multi_cast_stream_sink = null;
this.hive_table_sink = null;
this.iceberg_table_sink = null;
this.dictionary_sink = null;
this.blackhole_sink = null;
this.tvf_table_sink = null;
this.max_compute_table_sink = null;
this.iceberg_delete_sink = null;
this.iceberg_merge_sink = null;
}
/**
*
* @see TDataSinkType
*/
@org.apache.thrift.annotation.Nullable
public TDataSinkType getType() {
return this.type;
}
/**
*
* @see TDataSinkType
*/
public TDataSink setType(@org.apache.thrift.annotation.Nullable TDataSinkType type) {
this.type = type;
return this;
}
public void unsetType() {
this.type = null;
}
/** Returns true if field type is set (has been assigned a value) and false otherwise */
public boolean isSetType() {
return this.type != null;
}
public void setTypeIsSet(boolean value) {
if (!value) {
this.type = null;
}
}
@org.apache.thrift.annotation.Nullable
public TDataStreamSink getStreamSink() {
return this.stream_sink;
}
public TDataSink setStreamSink(@org.apache.thrift.annotation.Nullable TDataStreamSink stream_sink) {
this.stream_sink = stream_sink;
return this;
}
public void unsetStreamSink() {
this.stream_sink = null;
}
/** Returns true if field stream_sink is set (has been assigned a value) and false otherwise */
public boolean isSetStreamSink() {
return this.stream_sink != null;
}
public void setStreamSinkIsSet(boolean value) {
if (!value) {
this.stream_sink = null;
}
}
@org.apache.thrift.annotation.Nullable
public TResultSink getResultSink() {
return this.result_sink;
}
public TDataSink setResultSink(@org.apache.thrift.annotation.Nullable TResultSink result_sink) {
this.result_sink = result_sink;
return this;
}
public void unsetResultSink() {
this.result_sink = null;
}
/** Returns true if field result_sink is set (has been assigned a value) and false otherwise */
public boolean isSetResultSink() {
return this.result_sink != null;
}
public void setResultSinkIsSet(boolean value) {
if (!value) {
this.result_sink = null;
}
}
@org.apache.thrift.annotation.Nullable
public TMysqlTableSink getMysqlTableSink() {
return this.mysql_table_sink;
}
public TDataSink setMysqlTableSink(@org.apache.thrift.annotation.Nullable TMysqlTableSink mysql_table_sink) {
this.mysql_table_sink = mysql_table_sink;
return this;
}
public void unsetMysqlTableSink() {
this.mysql_table_sink = null;
}
/** Returns true if field mysql_table_sink is set (has been assigned a value) and false otherwise */
public boolean isSetMysqlTableSink() {
return this.mysql_table_sink != null;
}
public void setMysqlTableSinkIsSet(boolean value) {
if (!value) {
this.mysql_table_sink = null;
}
}
@org.apache.thrift.annotation.Nullable
public TExportSink getExportSink() {
return this.export_sink;
}
public TDataSink setExportSink(@org.apache.thrift.annotation.Nullable TExportSink export_sink) {
this.export_sink = export_sink;
return this;
}
public void unsetExportSink() {
this.export_sink = null;
}
/** Returns true if field export_sink is set (has been assigned a value) and false otherwise */
public boolean isSetExportSink() {
return this.export_sink != null;
}
public void setExportSinkIsSet(boolean value) {
if (!value) {
this.export_sink = null;
}
}
@org.apache.thrift.annotation.Nullable
public TOlapTableSink getOlapTableSink() {
return this.olap_table_sink;
}
public TDataSink setOlapTableSink(@org.apache.thrift.annotation.Nullable TOlapTableSink olap_table_sink) {
this.olap_table_sink = olap_table_sink;
return this;
}
public void unsetOlapTableSink() {
this.olap_table_sink = null;
}
/** Returns true if field olap_table_sink is set (has been assigned a value) and false otherwise */
public boolean isSetOlapTableSink() {
return this.olap_table_sink != null;
}
public void setOlapTableSinkIsSet(boolean value) {
if (!value) {
this.olap_table_sink = null;
}
}
@org.apache.thrift.annotation.Nullable
public TMemoryScratchSink getMemoryScratchSink() {
return this.memory_scratch_sink;
}
public TDataSink setMemoryScratchSink(@org.apache.thrift.annotation.Nullable TMemoryScratchSink memory_scratch_sink) {
this.memory_scratch_sink = memory_scratch_sink;
return this;
}
public void unsetMemoryScratchSink() {
this.memory_scratch_sink = null;
}
/** Returns true if field memory_scratch_sink is set (has been assigned a value) and false otherwise */
public boolean isSetMemoryScratchSink() {
return this.memory_scratch_sink != null;
}
public void setMemoryScratchSinkIsSet(boolean value) {
if (!value) {
this.memory_scratch_sink = null;
}
}
@org.apache.thrift.annotation.Nullable
public TOdbcTableSink getOdbcTableSink() {
return this.odbc_table_sink;
}
public TDataSink setOdbcTableSink(@org.apache.thrift.annotation.Nullable TOdbcTableSink odbc_table_sink) {
this.odbc_table_sink = odbc_table_sink;
return this;
}
public void unsetOdbcTableSink() {
this.odbc_table_sink = null;
}
/** Returns true if field odbc_table_sink is set (has been assigned a value) and false otherwise */
public boolean isSetOdbcTableSink() {
return this.odbc_table_sink != null;
}
public void setOdbcTableSinkIsSet(boolean value) {
if (!value) {
this.odbc_table_sink = null;
}
}
@org.apache.thrift.annotation.Nullable
public TResultFileSink getResultFileSink() {
return this.result_file_sink;
}
public TDataSink setResultFileSink(@org.apache.thrift.annotation.Nullable TResultFileSink result_file_sink) {
this.result_file_sink = result_file_sink;
return this;
}
public void unsetResultFileSink() {
this.result_file_sink = null;
}
/** Returns true if field result_file_sink is set (has been assigned a value) and false otherwise */
public boolean isSetResultFileSink() {
return this.result_file_sink != null;
}
public void setResultFileSinkIsSet(boolean value) {
if (!value) {
this.result_file_sink = null;
}
}
@org.apache.thrift.annotation.Nullable
public TJdbcTableSink getJdbcTableSink() {
return this.jdbc_table_sink;
}
public TDataSink setJdbcTableSink(@org.apache.thrift.annotation.Nullable TJdbcTableSink jdbc_table_sink) {
this.jdbc_table_sink = jdbc_table_sink;
return this;
}
public void unsetJdbcTableSink() {
this.jdbc_table_sink = null;
}
/** Returns true if field jdbc_table_sink is set (has been assigned a value) and false otherwise */
public boolean isSetJdbcTableSink() {
return this.jdbc_table_sink != null;
}
public void setJdbcTableSinkIsSet(boolean value) {
if (!value) {
this.jdbc_table_sink = null;
}
}
@org.apache.thrift.annotation.Nullable
public TMultiCastDataStreamSink getMultiCastStreamSink() {
return this.multi_cast_stream_sink;
}
public TDataSink setMultiCastStreamSink(@org.apache.thrift.annotation.Nullable TMultiCastDataStreamSink multi_cast_stream_sink) {
this.multi_cast_stream_sink = multi_cast_stream_sink;
return this;
}
public void unsetMultiCastStreamSink() {
this.multi_cast_stream_sink = null;
}
/** Returns true if field multi_cast_stream_sink is set (has been assigned a value) and false otherwise */
public boolean isSetMultiCastStreamSink() {
return this.multi_cast_stream_sink != null;
}
public void setMultiCastStreamSinkIsSet(boolean value) {
if (!value) {
this.multi_cast_stream_sink = null;
}
}
@org.apache.thrift.annotation.Nullable
public THiveTableSink getHiveTableSink() {
return this.hive_table_sink;
}
public TDataSink setHiveTableSink(@org.apache.thrift.annotation.Nullable THiveTableSink hive_table_sink) {
this.hive_table_sink = hive_table_sink;
return this;
}
public void unsetHiveTableSink() {
this.hive_table_sink = null;
}
/** Returns true if field hive_table_sink is set (has been assigned a value) and false otherwise */
public boolean isSetHiveTableSink() {
return this.hive_table_sink != null;
}
public void setHiveTableSinkIsSet(boolean value) {
if (!value) {
this.hive_table_sink = null;
}
}
@org.apache.thrift.annotation.Nullable
public TIcebergTableSink getIcebergTableSink() {
return this.iceberg_table_sink;
}
public TDataSink setIcebergTableSink(@org.apache.thrift.annotation.Nullable TIcebergTableSink iceberg_table_sink) {
this.iceberg_table_sink = iceberg_table_sink;
return this;
}
public void unsetIcebergTableSink() {
this.iceberg_table_sink = null;
}
/** Returns true if field iceberg_table_sink is set (has been assigned a value) and false otherwise */
public boolean isSetIcebergTableSink() {
return this.iceberg_table_sink != null;
}
public void setIcebergTableSinkIsSet(boolean value) {
if (!value) {
this.iceberg_table_sink = null;
}
}
@org.apache.thrift.annotation.Nullable
public TDictionarySink getDictionarySink() {
return this.dictionary_sink;
}
public TDataSink setDictionarySink(@org.apache.thrift.annotation.Nullable TDictionarySink dictionary_sink) {
this.dictionary_sink = dictionary_sink;
return this;
}
public void unsetDictionarySink() {
this.dictionary_sink = null;
}
/** Returns true if field dictionary_sink is set (has been assigned a value) and false otherwise */
public boolean isSetDictionarySink() {
return this.dictionary_sink != null;
}
public void setDictionarySinkIsSet(boolean value) {
if (!value) {
this.dictionary_sink = null;
}
}
@org.apache.thrift.annotation.Nullable
public TBlackholeSink getBlackholeSink() {
return this.blackhole_sink;
}
public TDataSink setBlackholeSink(@org.apache.thrift.annotation.Nullable TBlackholeSink blackhole_sink) {
this.blackhole_sink = blackhole_sink;
return this;
}
public void unsetBlackholeSink() {
this.blackhole_sink = null;
}
/** Returns true if field blackhole_sink is set (has been assigned a value) and false otherwise */
public boolean isSetBlackholeSink() {
return this.blackhole_sink != null;
}
public void setBlackholeSinkIsSet(boolean value) {
if (!value) {
this.blackhole_sink = null;
}
}
@org.apache.thrift.annotation.Nullable
public TTVFTableSink getTvfTableSink() {
return this.tvf_table_sink;
}
public TDataSink setTvfTableSink(@org.apache.thrift.annotation.Nullable TTVFTableSink tvf_table_sink) {
this.tvf_table_sink = tvf_table_sink;
return this;
}
public void unsetTvfTableSink() {
this.tvf_table_sink = null;
}
/** Returns true if field tvf_table_sink is set (has been assigned a value) and false otherwise */
public boolean isSetTvfTableSink() {
return this.tvf_table_sink != null;
}
public void setTvfTableSinkIsSet(boolean value) {
if (!value) {
this.tvf_table_sink = null;
}
}
@org.apache.thrift.annotation.Nullable
public TMaxComputeTableSink getMaxComputeTableSink() {
return this.max_compute_table_sink;
}
public TDataSink setMaxComputeTableSink(@org.apache.thrift.annotation.Nullable TMaxComputeTableSink max_compute_table_sink) {
this.max_compute_table_sink = max_compute_table_sink;
return this;
}
public void unsetMaxComputeTableSink() {
this.max_compute_table_sink = null;
}
/** Returns true if field max_compute_table_sink is set (has been assigned a value) and false otherwise */
public boolean isSetMaxComputeTableSink() {
return this.max_compute_table_sink != null;
}
public void setMaxComputeTableSinkIsSet(boolean value) {
if (!value) {
this.max_compute_table_sink = null;
}
}
@org.apache.thrift.annotation.Nullable
public TIcebergDeleteSink getIcebergDeleteSink() {
return this.iceberg_delete_sink;
}
public TDataSink setIcebergDeleteSink(@org.apache.thrift.annotation.Nullable TIcebergDeleteSink iceberg_delete_sink) {
this.iceberg_delete_sink = iceberg_delete_sink;
return this;
}
public void unsetIcebergDeleteSink() {
this.iceberg_delete_sink = null;
}
/** Returns true if field iceberg_delete_sink is set (has been assigned a value) and false otherwise */
public boolean isSetIcebergDeleteSink() {
return this.iceberg_delete_sink != null;
}
public void setIcebergDeleteSinkIsSet(boolean value) {
if (!value) {
this.iceberg_delete_sink = null;
}
}
@org.apache.thrift.annotation.Nullable
public TIcebergMergeSink getIcebergMergeSink() {
return this.iceberg_merge_sink;
}
public TDataSink setIcebergMergeSink(@org.apache.thrift.annotation.Nullable TIcebergMergeSink iceberg_merge_sink) {
this.iceberg_merge_sink = iceberg_merge_sink;
return this;
}
public void unsetIcebergMergeSink() {
this.iceberg_merge_sink = null;
}
/** Returns true if field iceberg_merge_sink is set (has been assigned a value) and false otherwise */
public boolean isSetIcebergMergeSink() {
return this.iceberg_merge_sink != null;
}
public void setIcebergMergeSinkIsSet(boolean value) {
if (!value) {
this.iceberg_merge_sink = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TYPE:
if (value == null) {
unsetType();
} else {
setType((TDataSinkType)value);
}
break;
case STREAM_SINK:
if (value == null) {
unsetStreamSink();
} else {
setStreamSink((TDataStreamSink)value);
}
break;
case RESULT_SINK:
if (value == null) {
unsetResultSink();
} else {
setResultSink((TResultSink)value);
}
break;
case MYSQL_TABLE_SINK:
if (value == null) {
unsetMysqlTableSink();
} else {
setMysqlTableSink((TMysqlTableSink)value);
}
break;
case EXPORT_SINK:
if (value == null) {
unsetExportSink();
} else {
setExportSink((TExportSink)value);
}
break;
case OLAP_TABLE_SINK:
if (value == null) {
unsetOlapTableSink();
} else {
setOlapTableSink((TOlapTableSink)value);
}
break;
case MEMORY_SCRATCH_SINK:
if (value == null) {
unsetMemoryScratchSink();
} else {
setMemoryScratchSink((TMemoryScratchSink)value);
}
break;
case ODBC_TABLE_SINK:
if (value == null) {
unsetOdbcTableSink();
} else {
setOdbcTableSink((TOdbcTableSink)value);
}
break;
case RESULT_FILE_SINK:
if (value == null) {
unsetResultFileSink();
} else {
setResultFileSink((TResultFileSink)value);
}
break;
case JDBC_TABLE_SINK:
if (value == null) {
unsetJdbcTableSink();
} else {
setJdbcTableSink((TJdbcTableSink)value);
}
break;
case MULTI_CAST_STREAM_SINK:
if (value == null) {
unsetMultiCastStreamSink();
} else {
setMultiCastStreamSink((TMultiCastDataStreamSink)value);
}
break;
case HIVE_TABLE_SINK:
if (value == null) {
unsetHiveTableSink();
} else {
setHiveTableSink((THiveTableSink)value);
}
break;
case ICEBERG_TABLE_SINK:
if (value == null) {
unsetIcebergTableSink();
} else {
setIcebergTableSink((TIcebergTableSink)value);
}
break;
case DICTIONARY_SINK:
if (value == null) {
unsetDictionarySink();
} else {
setDictionarySink((TDictionarySink)value);
}
break;
case BLACKHOLE_SINK:
if (value == null) {
unsetBlackholeSink();
} else {
setBlackholeSink((TBlackholeSink)value);
}
break;
case TVF_TABLE_SINK:
if (value == null) {
unsetTvfTableSink();
} else {
setTvfTableSink((TTVFTableSink)value);
}
break;
case MAX_COMPUTE_TABLE_SINK:
if (value == null) {
unsetMaxComputeTableSink();
} else {
setMaxComputeTableSink((TMaxComputeTableSink)value);
}
break;
case ICEBERG_DELETE_SINK:
if (value == null) {
unsetIcebergDeleteSink();
} else {
setIcebergDeleteSink((TIcebergDeleteSink)value);
}
break;
case ICEBERG_MERGE_SINK:
if (value == null) {
unsetIcebergMergeSink();
} else {
setIcebergMergeSink((TIcebergMergeSink)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TYPE:
return getType();
case STREAM_SINK:
return getStreamSink();
case RESULT_SINK:
return getResultSink();
case MYSQL_TABLE_SINK:
return getMysqlTableSink();
case EXPORT_SINK:
return getExportSink();
case OLAP_TABLE_SINK:
return getOlapTableSink();
case MEMORY_SCRATCH_SINK:
return getMemoryScratchSink();
case ODBC_TABLE_SINK:
return getOdbcTableSink();
case RESULT_FILE_SINK:
return getResultFileSink();
case JDBC_TABLE_SINK:
return getJdbcTableSink();
case MULTI_CAST_STREAM_SINK:
return getMultiCastStreamSink();
case HIVE_TABLE_SINK:
return getHiveTableSink();
case ICEBERG_TABLE_SINK:
return getIcebergTableSink();
case DICTIONARY_SINK:
return getDictionarySink();
case BLACKHOLE_SINK:
return getBlackholeSink();
case TVF_TABLE_SINK:
return getTvfTableSink();
case MAX_COMPUTE_TABLE_SINK:
return getMaxComputeTableSink();
case ICEBERG_DELETE_SINK:
return getIcebergDeleteSink();
case ICEBERG_MERGE_SINK:
return getIcebergMergeSink();
}
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 TYPE:
return isSetType();
case STREAM_SINK:
return isSetStreamSink();
case RESULT_SINK:
return isSetResultSink();
case MYSQL_TABLE_SINK:
return isSetMysqlTableSink();
case EXPORT_SINK:
return isSetExportSink();
case OLAP_TABLE_SINK:
return isSetOlapTableSink();
case MEMORY_SCRATCH_SINK:
return isSetMemoryScratchSink();
case ODBC_TABLE_SINK:
return isSetOdbcTableSink();
case RESULT_FILE_SINK:
return isSetResultFileSink();
case JDBC_TABLE_SINK:
return isSetJdbcTableSink();
case MULTI_CAST_STREAM_SINK:
return isSetMultiCastStreamSink();
case HIVE_TABLE_SINK:
return isSetHiveTableSink();
case ICEBERG_TABLE_SINK:
return isSetIcebergTableSink();
case DICTIONARY_SINK:
return isSetDictionarySink();
case BLACKHOLE_SINK:
return isSetBlackholeSink();
case TVF_TABLE_SINK:
return isSetTvfTableSink();
case MAX_COMPUTE_TABLE_SINK:
return isSetMaxComputeTableSink();
case ICEBERG_DELETE_SINK:
return isSetIcebergDeleteSink();
case ICEBERG_MERGE_SINK:
return isSetIcebergMergeSink();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TDataSink)
return this.equals((TDataSink)that);
return false;
}
public boolean equals(TDataSink that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_type = true && this.isSetType();
boolean that_present_type = true && that.isSetType();
if (this_present_type || that_present_type) {
if (!(this_present_type && that_present_type))
return false;
if (!this.type.equals(that.type))
return false;
}
boolean this_present_stream_sink = true && this.isSetStreamSink();
boolean that_present_stream_sink = true && that.isSetStreamSink();
if (this_present_stream_sink || that_present_stream_sink) {
if (!(this_present_stream_sink && that_present_stream_sink))
return false;
if (!this.stream_sink.equals(that.stream_sink))
return false;
}
boolean this_present_result_sink = true && this.isSetResultSink();
boolean that_present_result_sink = true && that.isSetResultSink();
if (this_present_result_sink || that_present_result_sink) {
if (!(this_present_result_sink && that_present_result_sink))
return false;
if (!this.result_sink.equals(that.result_sink))
return false;
}
boolean this_present_mysql_table_sink = true && this.isSetMysqlTableSink();
boolean that_present_mysql_table_sink = true && that.isSetMysqlTableSink();
if (this_present_mysql_table_sink || that_present_mysql_table_sink) {
if (!(this_present_mysql_table_sink && that_present_mysql_table_sink))
return false;
if (!this.mysql_table_sink.equals(that.mysql_table_sink))
return false;
}
boolean this_present_export_sink = true && this.isSetExportSink();
boolean that_present_export_sink = true && that.isSetExportSink();
if (this_present_export_sink || that_present_export_sink) {
if (!(this_present_export_sink && that_present_export_sink))
return false;
if (!this.export_sink.equals(that.export_sink))
return false;
}
boolean this_present_olap_table_sink = true && this.isSetOlapTableSink();
boolean that_present_olap_table_sink = true && that.isSetOlapTableSink();
if (this_present_olap_table_sink || that_present_olap_table_sink) {
if (!(this_present_olap_table_sink && that_present_olap_table_sink))
return false;
if (!this.olap_table_sink.equals(that.olap_table_sink))
return false;
}
boolean this_present_memory_scratch_sink = true && this.isSetMemoryScratchSink();
boolean that_present_memory_scratch_sink = true && that.isSetMemoryScratchSink();
if (this_present_memory_scratch_sink || that_present_memory_scratch_sink) {
if (!(this_present_memory_scratch_sink && that_present_memory_scratch_sink))
return false;
if (!this.memory_scratch_sink.equals(that.memory_scratch_sink))
return false;
}
boolean this_present_odbc_table_sink = true && this.isSetOdbcTableSink();
boolean that_present_odbc_table_sink = true && that.isSetOdbcTableSink();
if (this_present_odbc_table_sink || that_present_odbc_table_sink) {
if (!(this_present_odbc_table_sink && that_present_odbc_table_sink))
return false;
if (!this.odbc_table_sink.equals(that.odbc_table_sink))
return false;
}
boolean this_present_result_file_sink = true && this.isSetResultFileSink();
boolean that_present_result_file_sink = true && that.isSetResultFileSink();
if (this_present_result_file_sink || that_present_result_file_sink) {
if (!(this_present_result_file_sink && that_present_result_file_sink))
return false;
if (!this.result_file_sink.equals(that.result_file_sink))
return false;
}
boolean this_present_jdbc_table_sink = true && this.isSetJdbcTableSink();
boolean that_present_jdbc_table_sink = true && that.isSetJdbcTableSink();
if (this_present_jdbc_table_sink || that_present_jdbc_table_sink) {
if (!(this_present_jdbc_table_sink && that_present_jdbc_table_sink))
return false;
if (!this.jdbc_table_sink.equals(that.jdbc_table_sink))
return false;
}
boolean this_present_multi_cast_stream_sink = true && this.isSetMultiCastStreamSink();
boolean that_present_multi_cast_stream_sink = true && that.isSetMultiCastStreamSink();
if (this_present_multi_cast_stream_sink || that_present_multi_cast_stream_sink) {
if (!(this_present_multi_cast_stream_sink && that_present_multi_cast_stream_sink))
return false;
if (!this.multi_cast_stream_sink.equals(that.multi_cast_stream_sink))
return false;
}
boolean this_present_hive_table_sink = true && this.isSetHiveTableSink();
boolean that_present_hive_table_sink = true && that.isSetHiveTableSink();
if (this_present_hive_table_sink || that_present_hive_table_sink) {
if (!(this_present_hive_table_sink && that_present_hive_table_sink))
return false;
if (!this.hive_table_sink.equals(that.hive_table_sink))
return false;
}
boolean this_present_iceberg_table_sink = true && this.isSetIcebergTableSink();
boolean that_present_iceberg_table_sink = true && that.isSetIcebergTableSink();
if (this_present_iceberg_table_sink || that_present_iceberg_table_sink) {
if (!(this_present_iceberg_table_sink && that_present_iceberg_table_sink))
return false;
if (!this.iceberg_table_sink.equals(that.iceberg_table_sink))
return false;
}
boolean this_present_dictionary_sink = true && this.isSetDictionarySink();
boolean that_present_dictionary_sink = true && that.isSetDictionarySink();
if (this_present_dictionary_sink || that_present_dictionary_sink) {
if (!(this_present_dictionary_sink && that_present_dictionary_sink))
return false;
if (!this.dictionary_sink.equals(that.dictionary_sink))
return false;
}
boolean this_present_blackhole_sink = true && this.isSetBlackholeSink();
boolean that_present_blackhole_sink = true && that.isSetBlackholeSink();
if (this_present_blackhole_sink || that_present_blackhole_sink) {
if (!(this_present_blackhole_sink && that_present_blackhole_sink))
return false;
if (!this.blackhole_sink.equals(that.blackhole_sink))
return false;
}
boolean this_present_tvf_table_sink = true && this.isSetTvfTableSink();
boolean that_present_tvf_table_sink = true && that.isSetTvfTableSink();
if (this_present_tvf_table_sink || that_present_tvf_table_sink) {
if (!(this_present_tvf_table_sink && that_present_tvf_table_sink))
return false;
if (!this.tvf_table_sink.equals(that.tvf_table_sink))
return false;
}
boolean this_present_max_compute_table_sink = true && this.isSetMaxComputeTableSink();
boolean that_present_max_compute_table_sink = true && that.isSetMaxComputeTableSink();
if (this_present_max_compute_table_sink || that_present_max_compute_table_sink) {
if (!(this_present_max_compute_table_sink && that_present_max_compute_table_sink))
return false;
if (!this.max_compute_table_sink.equals(that.max_compute_table_sink))
return false;
}
boolean this_present_iceberg_delete_sink = true && this.isSetIcebergDeleteSink();
boolean that_present_iceberg_delete_sink = true && that.isSetIcebergDeleteSink();
if (this_present_iceberg_delete_sink || that_present_iceberg_delete_sink) {
if (!(this_present_iceberg_delete_sink && that_present_iceberg_delete_sink))
return false;
if (!this.iceberg_delete_sink.equals(that.iceberg_delete_sink))
return false;
}
boolean this_present_iceberg_merge_sink = true && this.isSetIcebergMergeSink();
boolean that_present_iceberg_merge_sink = true && that.isSetIcebergMergeSink();
if (this_present_iceberg_merge_sink || that_present_iceberg_merge_sink) {
if (!(this_present_iceberg_merge_sink && that_present_iceberg_merge_sink))
return false;
if (!this.iceberg_merge_sink.equals(that.iceberg_merge_sink))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287);
if (isSetType())
hashCode = hashCode * 8191 + type.getValue();
hashCode = hashCode * 8191 + ((isSetStreamSink()) ? 131071 : 524287);
if (isSetStreamSink())
hashCode = hashCode * 8191 + stream_sink.hashCode();
hashCode = hashCode * 8191 + ((isSetResultSink()) ? 131071 : 524287);
if (isSetResultSink())
hashCode = hashCode * 8191 + result_sink.hashCode();
hashCode = hashCode * 8191 + ((isSetMysqlTableSink()) ? 131071 : 524287);
if (isSetMysqlTableSink())
hashCode = hashCode * 8191 + mysql_table_sink.hashCode();
hashCode = hashCode * 8191 + ((isSetExportSink()) ? 131071 : 524287);
if (isSetExportSink())
hashCode = hashCode * 8191 + export_sink.hashCode();
hashCode = hashCode * 8191 + ((isSetOlapTableSink()) ? 131071 : 524287);
if (isSetOlapTableSink())
hashCode = hashCode * 8191 + olap_table_sink.hashCode();
hashCode = hashCode * 8191 + ((isSetMemoryScratchSink()) ? 131071 : 524287);
if (isSetMemoryScratchSink())
hashCode = hashCode * 8191 + memory_scratch_sink.hashCode();
hashCode = hashCode * 8191 + ((isSetOdbcTableSink()) ? 131071 : 524287);
if (isSetOdbcTableSink())
hashCode = hashCode * 8191 + odbc_table_sink.hashCode();
hashCode = hashCode * 8191 + ((isSetResultFileSink()) ? 131071 : 524287);
if (isSetResultFileSink())
hashCode = hashCode * 8191 + result_file_sink.hashCode();
hashCode = hashCode * 8191 + ((isSetJdbcTableSink()) ? 131071 : 524287);
if (isSetJdbcTableSink())
hashCode = hashCode * 8191 + jdbc_table_sink.hashCode();
hashCode = hashCode * 8191 + ((isSetMultiCastStreamSink()) ? 131071 : 524287);
if (isSetMultiCastStreamSink())
hashCode = hashCode * 8191 + multi_cast_stream_sink.hashCode();
hashCode = hashCode * 8191 + ((isSetHiveTableSink()) ? 131071 : 524287);
if (isSetHiveTableSink())
hashCode = hashCode * 8191 + hive_table_sink.hashCode();
hashCode = hashCode * 8191 + ((isSetIcebergTableSink()) ? 131071 : 524287);
if (isSetIcebergTableSink())
hashCode = hashCode * 8191 + iceberg_table_sink.hashCode();
hashCode = hashCode * 8191 + ((isSetDictionarySink()) ? 131071 : 524287);
if (isSetDictionarySink())
hashCode = hashCode * 8191 + dictionary_sink.hashCode();
hashCode = hashCode * 8191 + ((isSetBlackholeSink()) ? 131071 : 524287);
if (isSetBlackholeSink())
hashCode = hashCode * 8191 + blackhole_sink.hashCode();
hashCode = hashCode * 8191 + ((isSetTvfTableSink()) ? 131071 : 524287);
if (isSetTvfTableSink())
hashCode = hashCode * 8191 + tvf_table_sink.hashCode();
hashCode = hashCode * 8191 + ((isSetMaxComputeTableSink()) ? 131071 : 524287);
if (isSetMaxComputeTableSink())
hashCode = hashCode * 8191 + max_compute_table_sink.hashCode();
hashCode = hashCode * 8191 + ((isSetIcebergDeleteSink()) ? 131071 : 524287);
if (isSetIcebergDeleteSink())
hashCode = hashCode * 8191 + iceberg_delete_sink.hashCode();
hashCode = hashCode * 8191 + ((isSetIcebergMergeSink()) ? 131071 : 524287);
if (isSetIcebergMergeSink())
hashCode = hashCode * 8191 + iceberg_merge_sink.hashCode();
return hashCode;
}
@Override
public int compareTo(TDataSink other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetType()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetStreamSink(), other.isSetStreamSink());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStreamSink()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stream_sink, other.stream_sink);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetResultSink(), other.isSetResultSink());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetResultSink()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.result_sink, other.result_sink);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMysqlTableSink(), other.isSetMysqlTableSink());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMysqlTableSink()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mysql_table_sink, other.mysql_table_sink);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetExportSink(), other.isSetExportSink());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExportSink()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.export_sink, other.export_sink);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetOlapTableSink(), other.isSetOlapTableSink());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOlapTableSink()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.olap_table_sink, other.olap_table_sink);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMemoryScratchSink(), other.isSetMemoryScratchSink());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMemoryScratchSink()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.memory_scratch_sink, other.memory_scratch_sink);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetOdbcTableSink(), other.isSetOdbcTableSink());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOdbcTableSink()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.odbc_table_sink, other.odbc_table_sink);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetResultFileSink(), other.isSetResultFileSink());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetResultFileSink()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.result_file_sink, other.result_file_sink);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetJdbcTableSink(), other.isSetJdbcTableSink());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetJdbcTableSink()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jdbc_table_sink, other.jdbc_table_sink);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMultiCastStreamSink(), other.isSetMultiCastStreamSink());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMultiCastStreamSink()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.multi_cast_stream_sink, other.multi_cast_stream_sink);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetHiveTableSink(), other.isSetHiveTableSink());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHiveTableSink()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hive_table_sink, other.hive_table_sink);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetIcebergTableSink(), other.isSetIcebergTableSink());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIcebergTableSink()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.iceberg_table_sink, other.iceberg_table_sink);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDictionarySink(), other.isSetDictionarySink());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDictionarySink()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dictionary_sink, other.dictionary_sink);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetBlackholeSink(), other.isSetBlackholeSink());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBlackholeSink()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blackhole_sink, other.blackhole_sink);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTvfTableSink(), other.isSetTvfTableSink());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTvfTableSink()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tvf_table_sink, other.tvf_table_sink);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMaxComputeTableSink(), other.isSetMaxComputeTableSink());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMaxComputeTableSink()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_compute_table_sink, other.max_compute_table_sink);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetIcebergDeleteSink(), other.isSetIcebergDeleteSink());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIcebergDeleteSink()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.iceberg_delete_sink, other.iceberg_delete_sink);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetIcebergMergeSink(), other.isSetIcebergMergeSink());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIcebergMergeSink()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.iceberg_merge_sink, other.iceberg_merge_sink);
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("TDataSink(");
boolean first = true;
sb.append("type:");
if (this.type == null) {
sb.append("null");
} else {
sb.append(this.type);
}
first = false;
if (isSetStreamSink()) {
if (!first) sb.append(", ");
sb.append("stream_sink:");
if (this.stream_sink == null) {
sb.append("null");
} else {
sb.append(this.stream_sink);
}
first = false;
}
if (isSetResultSink()) {
if (!first) sb.append(", ");
sb.append("result_sink:");
if (this.result_sink == null) {
sb.append("null");
} else {
sb.append(this.result_sink);
}
first = false;
}
if (isSetMysqlTableSink()) {
if (!first) sb.append(", ");
sb.append("mysql_table_sink:");
if (this.mysql_table_sink == null) {
sb.append("null");
} else {
sb.append(this.mysql_table_sink);
}
first = false;
}
if (isSetExportSink()) {
if (!first) sb.append(", ");
sb.append("export_sink:");
if (this.export_sink == null) {
sb.append("null");
} else {
sb.append(this.export_sink);
}
first = false;
}
if (isSetOlapTableSink()) {
if (!first) sb.append(", ");
sb.append("olap_table_sink:");
if (this.olap_table_sink == null) {
sb.append("null");
} else {
sb.append(this.olap_table_sink);
}
first = false;
}
if (isSetMemoryScratchSink()) {
if (!first) sb.append(", ");
sb.append("memory_scratch_sink:");
if (this.memory_scratch_sink == null) {
sb.append("null");
} else {
sb.append(this.memory_scratch_sink);
}
first = false;
}
if (isSetOdbcTableSink()) {
if (!first) sb.append(", ");
sb.append("odbc_table_sink:");
if (this.odbc_table_sink == null) {
sb.append("null");
} else {
sb.append(this.odbc_table_sink);
}
first = false;
}
if (isSetResultFileSink()) {
if (!first) sb.append(", ");
sb.append("result_file_sink:");
if (this.result_file_sink == null) {
sb.append("null");
} else {
sb.append(this.result_file_sink);
}
first = false;
}
if (isSetJdbcTableSink()) {
if (!first) sb.append(", ");
sb.append("jdbc_table_sink:");
if (this.jdbc_table_sink == null) {
sb.append("null");
} else {
sb.append(this.jdbc_table_sink);
}
first = false;
}
if (isSetMultiCastStreamSink()) {
if (!first) sb.append(", ");
sb.append("multi_cast_stream_sink:");
if (this.multi_cast_stream_sink == null) {
sb.append("null");
} else {
sb.append(this.multi_cast_stream_sink);
}
first = false;
}
if (isSetHiveTableSink()) {
if (!first) sb.append(", ");
sb.append("hive_table_sink:");
if (this.hive_table_sink == null) {
sb.append("null");
} else {
sb.append(this.hive_table_sink);
}
first = false;
}
if (isSetIcebergTableSink()) {
if (!first) sb.append(", ");
sb.append("iceberg_table_sink:");
if (this.iceberg_table_sink == null) {
sb.append("null");
} else {
sb.append(this.iceberg_table_sink);
}
first = false;
}
if (isSetDictionarySink()) {
if (!first) sb.append(", ");
sb.append("dictionary_sink:");
if (this.dictionary_sink == null) {
sb.append("null");
} else {
sb.append(this.dictionary_sink);
}
first = false;
}
if (isSetBlackholeSink()) {
if (!first) sb.append(", ");
sb.append("blackhole_sink:");
if (this.blackhole_sink == null) {
sb.append("null");
} else {
sb.append(this.blackhole_sink);
}
first = false;
}
if (isSetTvfTableSink()) {
if (!first) sb.append(", ");
sb.append("tvf_table_sink:");
if (this.tvf_table_sink == null) {
sb.append("null");
} else {
sb.append(this.tvf_table_sink);
}
first = false;
}
if (isSetMaxComputeTableSink()) {
if (!first) sb.append(", ");
sb.append("max_compute_table_sink:");
if (this.max_compute_table_sink == null) {
sb.append("null");
} else {
sb.append(this.max_compute_table_sink);
}
first = false;
}
if (isSetIcebergDeleteSink()) {
if (!first) sb.append(", ");
sb.append("iceberg_delete_sink:");
if (this.iceberg_delete_sink == null) {
sb.append("null");
} else {
sb.append(this.iceberg_delete_sink);
}
first = false;
}
if (isSetIcebergMergeSink()) {
if (!first) sb.append(", ");
sb.append("iceberg_merge_sink:");
if (this.iceberg_merge_sink == null) {
sb.append("null");
} else {
sb.append(this.iceberg_merge_sink);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (type == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (stream_sink != null) {
stream_sink.validate();
}
if (result_sink != null) {
result_sink.validate();
}
if (mysql_table_sink != null) {
mysql_table_sink.validate();
}
if (export_sink != null) {
export_sink.validate();
}
if (olap_table_sink != null) {
olap_table_sink.validate();
}
if (memory_scratch_sink != null) {
memory_scratch_sink.validate();
}
if (odbc_table_sink != null) {
odbc_table_sink.validate();
}
if (result_file_sink != null) {
result_file_sink.validate();
}
if (jdbc_table_sink != null) {
jdbc_table_sink.validate();
}
if (multi_cast_stream_sink != null) {
multi_cast_stream_sink.validate();
}
if (hive_table_sink != null) {
hive_table_sink.validate();
}
if (iceberg_table_sink != null) {
iceberg_table_sink.validate();
}
if (dictionary_sink != null) {
dictionary_sink.validate();
}
if (blackhole_sink != null) {
blackhole_sink.validate();
}
if (tvf_table_sink != null) {
tvf_table_sink.validate();
}
if (max_compute_table_sink != null) {
max_compute_table_sink.validate();
}
if (iceberg_delete_sink != null) {
iceberg_delete_sink.validate();
}
if (iceberg_merge_sink != null) {
iceberg_merge_sink.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 TDataSinkStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TDataSinkStandardScheme getScheme() {
return new TDataSinkStandardScheme();
}
}
private static class TDataSinkStandardScheme extends org.apache.thrift.scheme.StandardScheme<TDataSink> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TDataSink 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: // TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.type = org.apache.doris.thrift.TDataSinkType.findByValue(iprot.readI32());
struct.setTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // STREAM_SINK
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.stream_sink = new TDataStreamSink();
struct.stream_sink.read(iprot);
struct.setStreamSinkIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // RESULT_SINK
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.result_sink = new TResultSink();
struct.result_sink.read(iprot);
struct.setResultSinkIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // MYSQL_TABLE_SINK
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.mysql_table_sink = new TMysqlTableSink();
struct.mysql_table_sink.read(iprot);
struct.setMysqlTableSinkIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // EXPORT_SINK
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.export_sink = new TExportSink();
struct.export_sink.read(iprot);
struct.setExportSinkIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // OLAP_TABLE_SINK
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.olap_table_sink = new TOlapTableSink();
struct.olap_table_sink.read(iprot);
struct.setOlapTableSinkIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // MEMORY_SCRATCH_SINK
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.memory_scratch_sink = new TMemoryScratchSink();
struct.memory_scratch_sink.read(iprot);
struct.setMemoryScratchSinkIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // ODBC_TABLE_SINK
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.odbc_table_sink = new TOdbcTableSink();
struct.odbc_table_sink.read(iprot);
struct.setOdbcTableSinkIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // RESULT_FILE_SINK
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.result_file_sink = new TResultFileSink();
struct.result_file_sink.read(iprot);
struct.setResultFileSinkIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // JDBC_TABLE_SINK
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.jdbc_table_sink = new TJdbcTableSink();
struct.jdbc_table_sink.read(iprot);
struct.setJdbcTableSinkIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 12: // MULTI_CAST_STREAM_SINK
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.multi_cast_stream_sink = new TMultiCastDataStreamSink();
struct.multi_cast_stream_sink.read(iprot);
struct.setMultiCastStreamSinkIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 13: // HIVE_TABLE_SINK
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.hive_table_sink = new THiveTableSink();
struct.hive_table_sink.read(iprot);
struct.setHiveTableSinkIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 14: // ICEBERG_TABLE_SINK
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.iceberg_table_sink = new TIcebergTableSink();
struct.iceberg_table_sink.read(iprot);
struct.setIcebergTableSinkIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 15: // DICTIONARY_SINK
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.dictionary_sink = new TDictionarySink();
struct.dictionary_sink.read(iprot);
struct.setDictionarySinkIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 16: // BLACKHOLE_SINK
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.blackhole_sink = new TBlackholeSink();
struct.blackhole_sink.read(iprot);
struct.setBlackholeSinkIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 17: // TVF_TABLE_SINK
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.tvf_table_sink = new TTVFTableSink();
struct.tvf_table_sink.read(iprot);
struct.setTvfTableSinkIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 18: // MAX_COMPUTE_TABLE_SINK
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.max_compute_table_sink = new TMaxComputeTableSink();
struct.max_compute_table_sink.read(iprot);
struct.setMaxComputeTableSinkIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 19: // ICEBERG_DELETE_SINK
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.iceberg_delete_sink = new TIcebergDeleteSink();
struct.iceberg_delete_sink.read(iprot);
struct.setIcebergDeleteSinkIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 20: // ICEBERG_MERGE_SINK
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.iceberg_merge_sink = new TIcebergMergeSink();
struct.iceberg_merge_sink.read(iprot);
struct.setIcebergMergeSinkIsSet(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, TDataSink struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.type != null) {
oprot.writeFieldBegin(TYPE_FIELD_DESC);
oprot.writeI32(struct.type.getValue());
oprot.writeFieldEnd();
}
if (struct.stream_sink != null) {
if (struct.isSetStreamSink()) {
oprot.writeFieldBegin(STREAM_SINK_FIELD_DESC);
struct.stream_sink.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.result_sink != null) {
if (struct.isSetResultSink()) {
oprot.writeFieldBegin(RESULT_SINK_FIELD_DESC);
struct.result_sink.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.mysql_table_sink != null) {
if (struct.isSetMysqlTableSink()) {
oprot.writeFieldBegin(MYSQL_TABLE_SINK_FIELD_DESC);
struct.mysql_table_sink.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.export_sink != null) {
if (struct.isSetExportSink()) {
oprot.writeFieldBegin(EXPORT_SINK_FIELD_DESC);
struct.export_sink.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.olap_table_sink != null) {
if (struct.isSetOlapTableSink()) {
oprot.writeFieldBegin(OLAP_TABLE_SINK_FIELD_DESC);
struct.olap_table_sink.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.memory_scratch_sink != null) {
if (struct.isSetMemoryScratchSink()) {
oprot.writeFieldBegin(MEMORY_SCRATCH_SINK_FIELD_DESC);
struct.memory_scratch_sink.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.odbc_table_sink != null) {
if (struct.isSetOdbcTableSink()) {
oprot.writeFieldBegin(ODBC_TABLE_SINK_FIELD_DESC);
struct.odbc_table_sink.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.result_file_sink != null) {
if (struct.isSetResultFileSink()) {
oprot.writeFieldBegin(RESULT_FILE_SINK_FIELD_DESC);
struct.result_file_sink.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.jdbc_table_sink != null) {
if (struct.isSetJdbcTableSink()) {
oprot.writeFieldBegin(JDBC_TABLE_SINK_FIELD_DESC);
struct.jdbc_table_sink.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.multi_cast_stream_sink != null) {
if (struct.isSetMultiCastStreamSink()) {
oprot.writeFieldBegin(MULTI_CAST_STREAM_SINK_FIELD_DESC);
struct.multi_cast_stream_sink.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.hive_table_sink != null) {
if (struct.isSetHiveTableSink()) {
oprot.writeFieldBegin(HIVE_TABLE_SINK_FIELD_DESC);
struct.hive_table_sink.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.iceberg_table_sink != null) {
if (struct.isSetIcebergTableSink()) {
oprot.writeFieldBegin(ICEBERG_TABLE_SINK_FIELD_DESC);
struct.iceberg_table_sink.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.dictionary_sink != null) {
if (struct.isSetDictionarySink()) {
oprot.writeFieldBegin(DICTIONARY_SINK_FIELD_DESC);
struct.dictionary_sink.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.blackhole_sink != null) {
if (struct.isSetBlackholeSink()) {
oprot.writeFieldBegin(BLACKHOLE_SINK_FIELD_DESC);
struct.blackhole_sink.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.tvf_table_sink != null) {
if (struct.isSetTvfTableSink()) {
oprot.writeFieldBegin(TVF_TABLE_SINK_FIELD_DESC);
struct.tvf_table_sink.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.max_compute_table_sink != null) {
if (struct.isSetMaxComputeTableSink()) {
oprot.writeFieldBegin(MAX_COMPUTE_TABLE_SINK_FIELD_DESC);
struct.max_compute_table_sink.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.iceberg_delete_sink != null) {
if (struct.isSetIcebergDeleteSink()) {
oprot.writeFieldBegin(ICEBERG_DELETE_SINK_FIELD_DESC);
struct.iceberg_delete_sink.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.iceberg_merge_sink != null) {
if (struct.isSetIcebergMergeSink()) {
oprot.writeFieldBegin(ICEBERG_MERGE_SINK_FIELD_DESC);
struct.iceberg_merge_sink.write(oprot);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TDataSinkTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TDataSinkTupleScheme getScheme() {
return new TDataSinkTupleScheme();
}
}
private static class TDataSinkTupleScheme extends org.apache.thrift.scheme.TupleScheme<TDataSink> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TDataSink struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI32(struct.type.getValue());
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetStreamSink()) {
optionals.set(0);
}
if (struct.isSetResultSink()) {
optionals.set(1);
}
if (struct.isSetMysqlTableSink()) {
optionals.set(2);
}
if (struct.isSetExportSink()) {
optionals.set(3);
}
if (struct.isSetOlapTableSink()) {
optionals.set(4);
}
if (struct.isSetMemoryScratchSink()) {
optionals.set(5);
}
if (struct.isSetOdbcTableSink()) {
optionals.set(6);
}
if (struct.isSetResultFileSink()) {
optionals.set(7);
}
if (struct.isSetJdbcTableSink()) {
optionals.set(8);
}
if (struct.isSetMultiCastStreamSink()) {
optionals.set(9);
}
if (struct.isSetHiveTableSink()) {
optionals.set(10);
}
if (struct.isSetIcebergTableSink()) {
optionals.set(11);
}
if (struct.isSetDictionarySink()) {
optionals.set(12);
}
if (struct.isSetBlackholeSink()) {
optionals.set(13);
}
if (struct.isSetTvfTableSink()) {
optionals.set(14);
}
if (struct.isSetMaxComputeTableSink()) {
optionals.set(15);
}
if (struct.isSetIcebergDeleteSink()) {
optionals.set(16);
}
if (struct.isSetIcebergMergeSink()) {
optionals.set(17);
}
oprot.writeBitSet(optionals, 18);
if (struct.isSetStreamSink()) {
struct.stream_sink.write(oprot);
}
if (struct.isSetResultSink()) {
struct.result_sink.write(oprot);
}
if (struct.isSetMysqlTableSink()) {
struct.mysql_table_sink.write(oprot);
}
if (struct.isSetExportSink()) {
struct.export_sink.write(oprot);
}
if (struct.isSetOlapTableSink()) {
struct.olap_table_sink.write(oprot);
}
if (struct.isSetMemoryScratchSink()) {
struct.memory_scratch_sink.write(oprot);
}
if (struct.isSetOdbcTableSink()) {
struct.odbc_table_sink.write(oprot);
}
if (struct.isSetResultFileSink()) {
struct.result_file_sink.write(oprot);
}
if (struct.isSetJdbcTableSink()) {
struct.jdbc_table_sink.write(oprot);
}
if (struct.isSetMultiCastStreamSink()) {
struct.multi_cast_stream_sink.write(oprot);
}
if (struct.isSetHiveTableSink()) {
struct.hive_table_sink.write(oprot);
}
if (struct.isSetIcebergTableSink()) {
struct.iceberg_table_sink.write(oprot);
}
if (struct.isSetDictionarySink()) {
struct.dictionary_sink.write(oprot);
}
if (struct.isSetBlackholeSink()) {
struct.blackhole_sink.write(oprot);
}
if (struct.isSetTvfTableSink()) {
struct.tvf_table_sink.write(oprot);
}
if (struct.isSetMaxComputeTableSink()) {
struct.max_compute_table_sink.write(oprot);
}
if (struct.isSetIcebergDeleteSink()) {
struct.iceberg_delete_sink.write(oprot);
}
if (struct.isSetIcebergMergeSink()) {
struct.iceberg_merge_sink.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TDataSink struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.type = org.apache.doris.thrift.TDataSinkType.findByValue(iprot.readI32());
struct.setTypeIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(18);
if (incoming.get(0)) {
struct.stream_sink = new TDataStreamSink();
struct.stream_sink.read(iprot);
struct.setStreamSinkIsSet(true);
}
if (incoming.get(1)) {
struct.result_sink = new TResultSink();
struct.result_sink.read(iprot);
struct.setResultSinkIsSet(true);
}
if (incoming.get(2)) {
struct.mysql_table_sink = new TMysqlTableSink();
struct.mysql_table_sink.read(iprot);
struct.setMysqlTableSinkIsSet(true);
}
if (incoming.get(3)) {
struct.export_sink = new TExportSink();
struct.export_sink.read(iprot);
struct.setExportSinkIsSet(true);
}
if (incoming.get(4)) {
struct.olap_table_sink = new TOlapTableSink();
struct.olap_table_sink.read(iprot);
struct.setOlapTableSinkIsSet(true);
}
if (incoming.get(5)) {
struct.memory_scratch_sink = new TMemoryScratchSink();
struct.memory_scratch_sink.read(iprot);
struct.setMemoryScratchSinkIsSet(true);
}
if (incoming.get(6)) {
struct.odbc_table_sink = new TOdbcTableSink();
struct.odbc_table_sink.read(iprot);
struct.setOdbcTableSinkIsSet(true);
}
if (incoming.get(7)) {
struct.result_file_sink = new TResultFileSink();
struct.result_file_sink.read(iprot);
struct.setResultFileSinkIsSet(true);
}
if (incoming.get(8)) {
struct.jdbc_table_sink = new TJdbcTableSink();
struct.jdbc_table_sink.read(iprot);
struct.setJdbcTableSinkIsSet(true);
}
if (incoming.get(9)) {
struct.multi_cast_stream_sink = new TMultiCastDataStreamSink();
struct.multi_cast_stream_sink.read(iprot);
struct.setMultiCastStreamSinkIsSet(true);
}
if (incoming.get(10)) {
struct.hive_table_sink = new THiveTableSink();
struct.hive_table_sink.read(iprot);
struct.setHiveTableSinkIsSet(true);
}
if (incoming.get(11)) {
struct.iceberg_table_sink = new TIcebergTableSink();
struct.iceberg_table_sink.read(iprot);
struct.setIcebergTableSinkIsSet(true);
}
if (incoming.get(12)) {
struct.dictionary_sink = new TDictionarySink();
struct.dictionary_sink.read(iprot);
struct.setDictionarySinkIsSet(true);
}
if (incoming.get(13)) {
struct.blackhole_sink = new TBlackholeSink();
struct.blackhole_sink.read(iprot);
struct.setBlackholeSinkIsSet(true);
}
if (incoming.get(14)) {
struct.tvf_table_sink = new TTVFTableSink();
struct.tvf_table_sink.read(iprot);
struct.setTvfTableSinkIsSet(true);
}
if (incoming.get(15)) {
struct.max_compute_table_sink = new TMaxComputeTableSink();
struct.max_compute_table_sink.read(iprot);
struct.setMaxComputeTableSinkIsSet(true);
}
if (incoming.get(16)) {
struct.iceberg_delete_sink = new TIcebergDeleteSink();
struct.iceberg_delete_sink.read(iprot);
struct.setIcebergDeleteSinkIsSet(true);
}
if (incoming.get(17)) {
struct.iceberg_merge_sink = new TIcebergMergeSink();
struct.iceberg_merge_sink.read(iprot);
struct.setIcebergMergeSinkIsSet(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();
}
}