TNormalizedAggregateNode.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 TNormalizedAggregateNode implements org.apache.thrift.TBase<TNormalizedAggregateNode, TNormalizedAggregateNode._Fields>, java.io.Serializable, Cloneable, Comparable<TNormalizedAggregateNode> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TNormalizedAggregateNode");
private static final org.apache.thrift.protocol.TField GROUPING_EXPRS_FIELD_DESC = new org.apache.thrift.protocol.TField("grouping_exprs", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField AGGREGATE_FUNCTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("aggregate_functions", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField INTERMEDIATE_TUPLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("intermediate_tuple_id", org.apache.thrift.protocol.TType.I32, (short)3);
private static final org.apache.thrift.protocol.TField OUTPUT_TUPLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("output_tuple_id", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField IS_FINALIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("is_finalize", org.apache.thrift.protocol.TType.BOOL, (short)5);
private static final org.apache.thrift.protocol.TField USE_STREAMING_PREAGGREGATION_FIELD_DESC = new org.apache.thrift.protocol.TField("use_streaming_preaggregation", org.apache.thrift.protocol.TType.BOOL, (short)6);
private static final org.apache.thrift.protocol.TField PROJECT_TO_AGG_INTERMEDIATE_TUPLE_FIELD_DESC = new org.apache.thrift.protocol.TField("projectToAggIntermediateTuple", org.apache.thrift.protocol.TType.LIST, (short)7);
private static final org.apache.thrift.protocol.TField PROJECT_TO_AGG_OUTPUT_TUPLE_FIELD_DESC = new org.apache.thrift.protocol.TField("projectToAggOutputTuple", org.apache.thrift.protocol.TType.LIST, (short)8);
private static final org.apache.thrift.protocol.TField SORT_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("sortInfo", org.apache.thrift.protocol.TType.STRUCT, (short)9);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TNormalizedAggregateNodeStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TNormalizedAggregateNodeTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TExpr> grouping_exprs; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TExpr> aggregate_functions; // optional
public int intermediate_tuple_id; // optional
public int output_tuple_id; // optional
public boolean is_finalize; // optional
public boolean use_streaming_preaggregation; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TExpr> projectToAggIntermediateTuple; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TExpr> projectToAggOutputTuple; // optional
public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TSortInfo sortInfo; // 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 {
GROUPING_EXPRS((short)1, "grouping_exprs"),
AGGREGATE_FUNCTIONS((short)2, "aggregate_functions"),
INTERMEDIATE_TUPLE_ID((short)3, "intermediate_tuple_id"),
OUTPUT_TUPLE_ID((short)4, "output_tuple_id"),
IS_FINALIZE((short)5, "is_finalize"),
USE_STREAMING_PREAGGREGATION((short)6, "use_streaming_preaggregation"),
PROJECT_TO_AGG_INTERMEDIATE_TUPLE((short)7, "projectToAggIntermediateTuple"),
PROJECT_TO_AGG_OUTPUT_TUPLE((short)8, "projectToAggOutputTuple"),
SORT_INFO((short)9, "sortInfo");
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: // GROUPING_EXPRS
return GROUPING_EXPRS;
case 2: // AGGREGATE_FUNCTIONS
return AGGREGATE_FUNCTIONS;
case 3: // INTERMEDIATE_TUPLE_ID
return INTERMEDIATE_TUPLE_ID;
case 4: // OUTPUT_TUPLE_ID
return OUTPUT_TUPLE_ID;
case 5: // IS_FINALIZE
return IS_FINALIZE;
case 6: // USE_STREAMING_PREAGGREGATION
return USE_STREAMING_PREAGGREGATION;
case 7: // PROJECT_TO_AGG_INTERMEDIATE_TUPLE
return PROJECT_TO_AGG_INTERMEDIATE_TUPLE;
case 8: // PROJECT_TO_AGG_OUTPUT_TUPLE
return PROJECT_TO_AGG_OUTPUT_TUPLE;
case 9: // SORT_INFO
return SORT_INFO;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __INTERMEDIATE_TUPLE_ID_ISSET_ID = 0;
private static final int __OUTPUT_TUPLE_ID_ISSET_ID = 1;
private static final int __IS_FINALIZE_ISSET_ID = 2;
private static final int __USE_STREAMING_PREAGGREGATION_ISSET_ID = 3;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.GROUPING_EXPRS,_Fields.AGGREGATE_FUNCTIONS,_Fields.INTERMEDIATE_TUPLE_ID,_Fields.OUTPUT_TUPLE_ID,_Fields.IS_FINALIZE,_Fields.USE_STREAMING_PREAGGREGATION,_Fields.PROJECT_TO_AGG_INTERMEDIATE_TUPLE,_Fields.PROJECT_TO_AGG_OUTPUT_TUPLE,_Fields.SORT_INFO};
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.GROUPING_EXPRS, new org.apache.thrift.meta_data.FieldMetaData("grouping_exprs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TExpr.class))));
tmpMap.put(_Fields.AGGREGATE_FUNCTIONS, new org.apache.thrift.meta_data.FieldMetaData("aggregate_functions", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TExpr.class))));
tmpMap.put(_Fields.INTERMEDIATE_TUPLE_ID, new org.apache.thrift.meta_data.FieldMetaData("intermediate_tuple_id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "TTupleId")));
tmpMap.put(_Fields.OUTPUT_TUPLE_ID, new org.apache.thrift.meta_data.FieldMetaData("output_tuple_id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "TTupleId")));
tmpMap.put(_Fields.IS_FINALIZE, new org.apache.thrift.meta_data.FieldMetaData("is_finalize", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.USE_STREAMING_PREAGGREGATION, new org.apache.thrift.meta_data.FieldMetaData("use_streaming_preaggregation", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.PROJECT_TO_AGG_INTERMEDIATE_TUPLE, new org.apache.thrift.meta_data.FieldMetaData("projectToAggIntermediateTuple", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TExpr.class))));
tmpMap.put(_Fields.PROJECT_TO_AGG_OUTPUT_TUPLE, new org.apache.thrift.meta_data.FieldMetaData("projectToAggOutputTuple", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TExpr.class))));
tmpMap.put(_Fields.SORT_INFO, new org.apache.thrift.meta_data.FieldMetaData("sortInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TSortInfo.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TNormalizedAggregateNode.class, metaDataMap);
}
public TNormalizedAggregateNode() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TNormalizedAggregateNode(TNormalizedAggregateNode other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetGroupingExprs()) {
java.util.List<org.apache.doris.thrift.TExpr> __this__grouping_exprs = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(other.grouping_exprs.size());
for (org.apache.doris.thrift.TExpr other_element : other.grouping_exprs) {
__this__grouping_exprs.add(new org.apache.doris.thrift.TExpr(other_element));
}
this.grouping_exprs = __this__grouping_exprs;
}
if (other.isSetAggregateFunctions()) {
java.util.List<org.apache.doris.thrift.TExpr> __this__aggregate_functions = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(other.aggregate_functions.size());
for (org.apache.doris.thrift.TExpr other_element : other.aggregate_functions) {
__this__aggregate_functions.add(new org.apache.doris.thrift.TExpr(other_element));
}
this.aggregate_functions = __this__aggregate_functions;
}
this.intermediate_tuple_id = other.intermediate_tuple_id;
this.output_tuple_id = other.output_tuple_id;
this.is_finalize = other.is_finalize;
this.use_streaming_preaggregation = other.use_streaming_preaggregation;
if (other.isSetProjectToAggIntermediateTuple()) {
java.util.List<org.apache.doris.thrift.TExpr> __this__projectToAggIntermediateTuple = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(other.projectToAggIntermediateTuple.size());
for (org.apache.doris.thrift.TExpr other_element : other.projectToAggIntermediateTuple) {
__this__projectToAggIntermediateTuple.add(new org.apache.doris.thrift.TExpr(other_element));
}
this.projectToAggIntermediateTuple = __this__projectToAggIntermediateTuple;
}
if (other.isSetProjectToAggOutputTuple()) {
java.util.List<org.apache.doris.thrift.TExpr> __this__projectToAggOutputTuple = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(other.projectToAggOutputTuple.size());
for (org.apache.doris.thrift.TExpr other_element : other.projectToAggOutputTuple) {
__this__projectToAggOutputTuple.add(new org.apache.doris.thrift.TExpr(other_element));
}
this.projectToAggOutputTuple = __this__projectToAggOutputTuple;
}
if (other.isSetSortInfo()) {
this.sortInfo = new org.apache.doris.thrift.TSortInfo(other.sortInfo);
}
}
public TNormalizedAggregateNode deepCopy() {
return new TNormalizedAggregateNode(this);
}
@Override
public void clear() {
this.grouping_exprs = null;
this.aggregate_functions = null;
setIntermediateTupleIdIsSet(false);
this.intermediate_tuple_id = 0;
setOutputTupleIdIsSet(false);
this.output_tuple_id = 0;
setIsFinalizeIsSet(false);
this.is_finalize = false;
setUseStreamingPreaggregationIsSet(false);
this.use_streaming_preaggregation = false;
this.projectToAggIntermediateTuple = null;
this.projectToAggOutputTuple = null;
this.sortInfo = null;
}
public int getGroupingExprsSize() {
return (this.grouping_exprs == null) ? 0 : this.grouping_exprs.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<org.apache.doris.thrift.TExpr> getGroupingExprsIterator() {
return (this.grouping_exprs == null) ? null : this.grouping_exprs.iterator();
}
public void addToGroupingExprs(org.apache.doris.thrift.TExpr elem) {
if (this.grouping_exprs == null) {
this.grouping_exprs = new java.util.ArrayList<org.apache.doris.thrift.TExpr>();
}
this.grouping_exprs.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<org.apache.doris.thrift.TExpr> getGroupingExprs() {
return this.grouping_exprs;
}
public TNormalizedAggregateNode setGroupingExprs(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TExpr> grouping_exprs) {
this.grouping_exprs = grouping_exprs;
return this;
}
public void unsetGroupingExprs() {
this.grouping_exprs = null;
}
/** Returns true if field grouping_exprs is set (has been assigned a value) and false otherwise */
public boolean isSetGroupingExprs() {
return this.grouping_exprs != null;
}
public void setGroupingExprsIsSet(boolean value) {
if (!value) {
this.grouping_exprs = null;
}
}
public int getAggregateFunctionsSize() {
return (this.aggregate_functions == null) ? 0 : this.aggregate_functions.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<org.apache.doris.thrift.TExpr> getAggregateFunctionsIterator() {
return (this.aggregate_functions == null) ? null : this.aggregate_functions.iterator();
}
public void addToAggregateFunctions(org.apache.doris.thrift.TExpr elem) {
if (this.aggregate_functions == null) {
this.aggregate_functions = new java.util.ArrayList<org.apache.doris.thrift.TExpr>();
}
this.aggregate_functions.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<org.apache.doris.thrift.TExpr> getAggregateFunctions() {
return this.aggregate_functions;
}
public TNormalizedAggregateNode setAggregateFunctions(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TExpr> aggregate_functions) {
this.aggregate_functions = aggregate_functions;
return this;
}
public void unsetAggregateFunctions() {
this.aggregate_functions = null;
}
/** Returns true if field aggregate_functions is set (has been assigned a value) and false otherwise */
public boolean isSetAggregateFunctions() {
return this.aggregate_functions != null;
}
public void setAggregateFunctionsIsSet(boolean value) {
if (!value) {
this.aggregate_functions = null;
}
}
public int getIntermediateTupleId() {
return this.intermediate_tuple_id;
}
public TNormalizedAggregateNode setIntermediateTupleId(int intermediate_tuple_id) {
this.intermediate_tuple_id = intermediate_tuple_id;
setIntermediateTupleIdIsSet(true);
return this;
}
public void unsetIntermediateTupleId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INTERMEDIATE_TUPLE_ID_ISSET_ID);
}
/** Returns true if field intermediate_tuple_id is set (has been assigned a value) and false otherwise */
public boolean isSetIntermediateTupleId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INTERMEDIATE_TUPLE_ID_ISSET_ID);
}
public void setIntermediateTupleIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INTERMEDIATE_TUPLE_ID_ISSET_ID, value);
}
public int getOutputTupleId() {
return this.output_tuple_id;
}
public TNormalizedAggregateNode setOutputTupleId(int output_tuple_id) {
this.output_tuple_id = output_tuple_id;
setOutputTupleIdIsSet(true);
return this;
}
public void unsetOutputTupleId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __OUTPUT_TUPLE_ID_ISSET_ID);
}
/** Returns true if field output_tuple_id is set (has been assigned a value) and false otherwise */
public boolean isSetOutputTupleId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OUTPUT_TUPLE_ID_ISSET_ID);
}
public void setOutputTupleIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OUTPUT_TUPLE_ID_ISSET_ID, value);
}
public boolean isIsFinalize() {
return this.is_finalize;
}
public TNormalizedAggregateNode setIsFinalize(boolean is_finalize) {
this.is_finalize = is_finalize;
setIsFinalizeIsSet(true);
return this;
}
public void unsetIsFinalize() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_FINALIZE_ISSET_ID);
}
/** Returns true if field is_finalize is set (has been assigned a value) and false otherwise */
public boolean isSetIsFinalize() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_FINALIZE_ISSET_ID);
}
public void setIsFinalizeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_FINALIZE_ISSET_ID, value);
}
public boolean isUseStreamingPreaggregation() {
return this.use_streaming_preaggregation;
}
public TNormalizedAggregateNode setUseStreamingPreaggregation(boolean use_streaming_preaggregation) {
this.use_streaming_preaggregation = use_streaming_preaggregation;
setUseStreamingPreaggregationIsSet(true);
return this;
}
public void unsetUseStreamingPreaggregation() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __USE_STREAMING_PREAGGREGATION_ISSET_ID);
}
/** Returns true if field use_streaming_preaggregation is set (has been assigned a value) and false otherwise */
public boolean isSetUseStreamingPreaggregation() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __USE_STREAMING_PREAGGREGATION_ISSET_ID);
}
public void setUseStreamingPreaggregationIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __USE_STREAMING_PREAGGREGATION_ISSET_ID, value);
}
public int getProjectToAggIntermediateTupleSize() {
return (this.projectToAggIntermediateTuple == null) ? 0 : this.projectToAggIntermediateTuple.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<org.apache.doris.thrift.TExpr> getProjectToAggIntermediateTupleIterator() {
return (this.projectToAggIntermediateTuple == null) ? null : this.projectToAggIntermediateTuple.iterator();
}
public void addToProjectToAggIntermediateTuple(org.apache.doris.thrift.TExpr elem) {
if (this.projectToAggIntermediateTuple == null) {
this.projectToAggIntermediateTuple = new java.util.ArrayList<org.apache.doris.thrift.TExpr>();
}
this.projectToAggIntermediateTuple.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<org.apache.doris.thrift.TExpr> getProjectToAggIntermediateTuple() {
return this.projectToAggIntermediateTuple;
}
public TNormalizedAggregateNode setProjectToAggIntermediateTuple(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TExpr> projectToAggIntermediateTuple) {
this.projectToAggIntermediateTuple = projectToAggIntermediateTuple;
return this;
}
public void unsetProjectToAggIntermediateTuple() {
this.projectToAggIntermediateTuple = null;
}
/** Returns true if field projectToAggIntermediateTuple is set (has been assigned a value) and false otherwise */
public boolean isSetProjectToAggIntermediateTuple() {
return this.projectToAggIntermediateTuple != null;
}
public void setProjectToAggIntermediateTupleIsSet(boolean value) {
if (!value) {
this.projectToAggIntermediateTuple = null;
}
}
public int getProjectToAggOutputTupleSize() {
return (this.projectToAggOutputTuple == null) ? 0 : this.projectToAggOutputTuple.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<org.apache.doris.thrift.TExpr> getProjectToAggOutputTupleIterator() {
return (this.projectToAggOutputTuple == null) ? null : this.projectToAggOutputTuple.iterator();
}
public void addToProjectToAggOutputTuple(org.apache.doris.thrift.TExpr elem) {
if (this.projectToAggOutputTuple == null) {
this.projectToAggOutputTuple = new java.util.ArrayList<org.apache.doris.thrift.TExpr>();
}
this.projectToAggOutputTuple.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<org.apache.doris.thrift.TExpr> getProjectToAggOutputTuple() {
return this.projectToAggOutputTuple;
}
public TNormalizedAggregateNode setProjectToAggOutputTuple(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TExpr> projectToAggOutputTuple) {
this.projectToAggOutputTuple = projectToAggOutputTuple;
return this;
}
public void unsetProjectToAggOutputTuple() {
this.projectToAggOutputTuple = null;
}
/** Returns true if field projectToAggOutputTuple is set (has been assigned a value) and false otherwise */
public boolean isSetProjectToAggOutputTuple() {
return this.projectToAggOutputTuple != null;
}
public void setProjectToAggOutputTupleIsSet(boolean value) {
if (!value) {
this.projectToAggOutputTuple = null;
}
}
@org.apache.thrift.annotation.Nullable
public org.apache.doris.thrift.TSortInfo getSortInfo() {
return this.sortInfo;
}
public TNormalizedAggregateNode setSortInfo(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TSortInfo sortInfo) {
this.sortInfo = sortInfo;
return this;
}
public void unsetSortInfo() {
this.sortInfo = null;
}
/** Returns true if field sortInfo is set (has been assigned a value) and false otherwise */
public boolean isSetSortInfo() {
return this.sortInfo != null;
}
public void setSortInfoIsSet(boolean value) {
if (!value) {
this.sortInfo = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case GROUPING_EXPRS:
if (value == null) {
unsetGroupingExprs();
} else {
setGroupingExprs((java.util.List<org.apache.doris.thrift.TExpr>)value);
}
break;
case AGGREGATE_FUNCTIONS:
if (value == null) {
unsetAggregateFunctions();
} else {
setAggregateFunctions((java.util.List<org.apache.doris.thrift.TExpr>)value);
}
break;
case INTERMEDIATE_TUPLE_ID:
if (value == null) {
unsetIntermediateTupleId();
} else {
setIntermediateTupleId((java.lang.Integer)value);
}
break;
case OUTPUT_TUPLE_ID:
if (value == null) {
unsetOutputTupleId();
} else {
setOutputTupleId((java.lang.Integer)value);
}
break;
case IS_FINALIZE:
if (value == null) {
unsetIsFinalize();
} else {
setIsFinalize((java.lang.Boolean)value);
}
break;
case USE_STREAMING_PREAGGREGATION:
if (value == null) {
unsetUseStreamingPreaggregation();
} else {
setUseStreamingPreaggregation((java.lang.Boolean)value);
}
break;
case PROJECT_TO_AGG_INTERMEDIATE_TUPLE:
if (value == null) {
unsetProjectToAggIntermediateTuple();
} else {
setProjectToAggIntermediateTuple((java.util.List<org.apache.doris.thrift.TExpr>)value);
}
break;
case PROJECT_TO_AGG_OUTPUT_TUPLE:
if (value == null) {
unsetProjectToAggOutputTuple();
} else {
setProjectToAggOutputTuple((java.util.List<org.apache.doris.thrift.TExpr>)value);
}
break;
case SORT_INFO:
if (value == null) {
unsetSortInfo();
} else {
setSortInfo((org.apache.doris.thrift.TSortInfo)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case GROUPING_EXPRS:
return getGroupingExprs();
case AGGREGATE_FUNCTIONS:
return getAggregateFunctions();
case INTERMEDIATE_TUPLE_ID:
return getIntermediateTupleId();
case OUTPUT_TUPLE_ID:
return getOutputTupleId();
case IS_FINALIZE:
return isIsFinalize();
case USE_STREAMING_PREAGGREGATION:
return isUseStreamingPreaggregation();
case PROJECT_TO_AGG_INTERMEDIATE_TUPLE:
return getProjectToAggIntermediateTuple();
case PROJECT_TO_AGG_OUTPUT_TUPLE:
return getProjectToAggOutputTuple();
case SORT_INFO:
return getSortInfo();
}
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 GROUPING_EXPRS:
return isSetGroupingExprs();
case AGGREGATE_FUNCTIONS:
return isSetAggregateFunctions();
case INTERMEDIATE_TUPLE_ID:
return isSetIntermediateTupleId();
case OUTPUT_TUPLE_ID:
return isSetOutputTupleId();
case IS_FINALIZE:
return isSetIsFinalize();
case USE_STREAMING_PREAGGREGATION:
return isSetUseStreamingPreaggregation();
case PROJECT_TO_AGG_INTERMEDIATE_TUPLE:
return isSetProjectToAggIntermediateTuple();
case PROJECT_TO_AGG_OUTPUT_TUPLE:
return isSetProjectToAggOutputTuple();
case SORT_INFO:
return isSetSortInfo();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TNormalizedAggregateNode)
return this.equals((TNormalizedAggregateNode)that);
return false;
}
public boolean equals(TNormalizedAggregateNode that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_grouping_exprs = true && this.isSetGroupingExprs();
boolean that_present_grouping_exprs = true && that.isSetGroupingExprs();
if (this_present_grouping_exprs || that_present_grouping_exprs) {
if (!(this_present_grouping_exprs && that_present_grouping_exprs))
return false;
if (!this.grouping_exprs.equals(that.grouping_exprs))
return false;
}
boolean this_present_aggregate_functions = true && this.isSetAggregateFunctions();
boolean that_present_aggregate_functions = true && that.isSetAggregateFunctions();
if (this_present_aggregate_functions || that_present_aggregate_functions) {
if (!(this_present_aggregate_functions && that_present_aggregate_functions))
return false;
if (!this.aggregate_functions.equals(that.aggregate_functions))
return false;
}
boolean this_present_intermediate_tuple_id = true && this.isSetIntermediateTupleId();
boolean that_present_intermediate_tuple_id = true && that.isSetIntermediateTupleId();
if (this_present_intermediate_tuple_id || that_present_intermediate_tuple_id) {
if (!(this_present_intermediate_tuple_id && that_present_intermediate_tuple_id))
return false;
if (this.intermediate_tuple_id != that.intermediate_tuple_id)
return false;
}
boolean this_present_output_tuple_id = true && this.isSetOutputTupleId();
boolean that_present_output_tuple_id = true && that.isSetOutputTupleId();
if (this_present_output_tuple_id || that_present_output_tuple_id) {
if (!(this_present_output_tuple_id && that_present_output_tuple_id))
return false;
if (this.output_tuple_id != that.output_tuple_id)
return false;
}
boolean this_present_is_finalize = true && this.isSetIsFinalize();
boolean that_present_is_finalize = true && that.isSetIsFinalize();
if (this_present_is_finalize || that_present_is_finalize) {
if (!(this_present_is_finalize && that_present_is_finalize))
return false;
if (this.is_finalize != that.is_finalize)
return false;
}
boolean this_present_use_streaming_preaggregation = true && this.isSetUseStreamingPreaggregation();
boolean that_present_use_streaming_preaggregation = true && that.isSetUseStreamingPreaggregation();
if (this_present_use_streaming_preaggregation || that_present_use_streaming_preaggregation) {
if (!(this_present_use_streaming_preaggregation && that_present_use_streaming_preaggregation))
return false;
if (this.use_streaming_preaggregation != that.use_streaming_preaggregation)
return false;
}
boolean this_present_projectToAggIntermediateTuple = true && this.isSetProjectToAggIntermediateTuple();
boolean that_present_projectToAggIntermediateTuple = true && that.isSetProjectToAggIntermediateTuple();
if (this_present_projectToAggIntermediateTuple || that_present_projectToAggIntermediateTuple) {
if (!(this_present_projectToAggIntermediateTuple && that_present_projectToAggIntermediateTuple))
return false;
if (!this.projectToAggIntermediateTuple.equals(that.projectToAggIntermediateTuple))
return false;
}
boolean this_present_projectToAggOutputTuple = true && this.isSetProjectToAggOutputTuple();
boolean that_present_projectToAggOutputTuple = true && that.isSetProjectToAggOutputTuple();
if (this_present_projectToAggOutputTuple || that_present_projectToAggOutputTuple) {
if (!(this_present_projectToAggOutputTuple && that_present_projectToAggOutputTuple))
return false;
if (!this.projectToAggOutputTuple.equals(that.projectToAggOutputTuple))
return false;
}
boolean this_present_sortInfo = true && this.isSetSortInfo();
boolean that_present_sortInfo = true && that.isSetSortInfo();
if (this_present_sortInfo || that_present_sortInfo) {
if (!(this_present_sortInfo && that_present_sortInfo))
return false;
if (!this.sortInfo.equals(that.sortInfo))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetGroupingExprs()) ? 131071 : 524287);
if (isSetGroupingExprs())
hashCode = hashCode * 8191 + grouping_exprs.hashCode();
hashCode = hashCode * 8191 + ((isSetAggregateFunctions()) ? 131071 : 524287);
if (isSetAggregateFunctions())
hashCode = hashCode * 8191 + aggregate_functions.hashCode();
hashCode = hashCode * 8191 + ((isSetIntermediateTupleId()) ? 131071 : 524287);
if (isSetIntermediateTupleId())
hashCode = hashCode * 8191 + intermediate_tuple_id;
hashCode = hashCode * 8191 + ((isSetOutputTupleId()) ? 131071 : 524287);
if (isSetOutputTupleId())
hashCode = hashCode * 8191 + output_tuple_id;
hashCode = hashCode * 8191 + ((isSetIsFinalize()) ? 131071 : 524287);
if (isSetIsFinalize())
hashCode = hashCode * 8191 + ((is_finalize) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetUseStreamingPreaggregation()) ? 131071 : 524287);
if (isSetUseStreamingPreaggregation())
hashCode = hashCode * 8191 + ((use_streaming_preaggregation) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetProjectToAggIntermediateTuple()) ? 131071 : 524287);
if (isSetProjectToAggIntermediateTuple())
hashCode = hashCode * 8191 + projectToAggIntermediateTuple.hashCode();
hashCode = hashCode * 8191 + ((isSetProjectToAggOutputTuple()) ? 131071 : 524287);
if (isSetProjectToAggOutputTuple())
hashCode = hashCode * 8191 + projectToAggOutputTuple.hashCode();
hashCode = hashCode * 8191 + ((isSetSortInfo()) ? 131071 : 524287);
if (isSetSortInfo())
hashCode = hashCode * 8191 + sortInfo.hashCode();
return hashCode;
}
@Override
public int compareTo(TNormalizedAggregateNode other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetGroupingExprs(), other.isSetGroupingExprs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGroupingExprs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grouping_exprs, other.grouping_exprs);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetAggregateFunctions(), other.isSetAggregateFunctions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAggregateFunctions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aggregate_functions, other.aggregate_functions);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetIntermediateTupleId(), other.isSetIntermediateTupleId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIntermediateTupleId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.intermediate_tuple_id, other.intermediate_tuple_id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetOutputTupleId(), other.isSetOutputTupleId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOutputTupleId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.output_tuple_id, other.output_tuple_id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetIsFinalize(), other.isSetIsFinalize());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIsFinalize()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_finalize, other.is_finalize);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetUseStreamingPreaggregation(), other.isSetUseStreamingPreaggregation());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUseStreamingPreaggregation()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.use_streaming_preaggregation, other.use_streaming_preaggregation);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetProjectToAggIntermediateTuple(), other.isSetProjectToAggIntermediateTuple());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetProjectToAggIntermediateTuple()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projectToAggIntermediateTuple, other.projectToAggIntermediateTuple);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetProjectToAggOutputTuple(), other.isSetProjectToAggOutputTuple());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetProjectToAggOutputTuple()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projectToAggOutputTuple, other.projectToAggOutputTuple);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSortInfo(), other.isSetSortInfo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSortInfo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sortInfo, other.sortInfo);
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("TNormalizedAggregateNode(");
boolean first = true;
if (isSetGroupingExprs()) {
sb.append("grouping_exprs:");
if (this.grouping_exprs == null) {
sb.append("null");
} else {
sb.append(this.grouping_exprs);
}
first = false;
}
if (isSetAggregateFunctions()) {
if (!first) sb.append(", ");
sb.append("aggregate_functions:");
if (this.aggregate_functions == null) {
sb.append("null");
} else {
sb.append(this.aggregate_functions);
}
first = false;
}
if (isSetIntermediateTupleId()) {
if (!first) sb.append(", ");
sb.append("intermediate_tuple_id:");
sb.append(this.intermediate_tuple_id);
first = false;
}
if (isSetOutputTupleId()) {
if (!first) sb.append(", ");
sb.append("output_tuple_id:");
sb.append(this.output_tuple_id);
first = false;
}
if (isSetIsFinalize()) {
if (!first) sb.append(", ");
sb.append("is_finalize:");
sb.append(this.is_finalize);
first = false;
}
if (isSetUseStreamingPreaggregation()) {
if (!first) sb.append(", ");
sb.append("use_streaming_preaggregation:");
sb.append(this.use_streaming_preaggregation);
first = false;
}
if (isSetProjectToAggIntermediateTuple()) {
if (!first) sb.append(", ");
sb.append("projectToAggIntermediateTuple:");
if (this.projectToAggIntermediateTuple == null) {
sb.append("null");
} else {
sb.append(this.projectToAggIntermediateTuple);
}
first = false;
}
if (isSetProjectToAggOutputTuple()) {
if (!first) sb.append(", ");
sb.append("projectToAggOutputTuple:");
if (this.projectToAggOutputTuple == null) {
sb.append("null");
} else {
sb.append(this.projectToAggOutputTuple);
}
first = false;
}
if (isSetSortInfo()) {
if (!first) sb.append(", ");
sb.append("sortInfo:");
if (this.sortInfo == null) {
sb.append("null");
} else {
sb.append(this.sortInfo);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (sortInfo != null) {
sortInfo.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class TNormalizedAggregateNodeStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TNormalizedAggregateNodeStandardScheme getScheme() {
return new TNormalizedAggregateNodeStandardScheme();
}
}
private static class TNormalizedAggregateNodeStandardScheme extends org.apache.thrift.scheme.StandardScheme<TNormalizedAggregateNode> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TNormalizedAggregateNode 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: // GROUPING_EXPRS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
struct.grouping_exprs = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(_list24.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr _elem25;
for (int _i26 = 0; _i26 < _list24.size; ++_i26)
{
_elem25 = new org.apache.doris.thrift.TExpr();
_elem25.read(iprot);
struct.grouping_exprs.add(_elem25);
}
iprot.readListEnd();
}
struct.setGroupingExprsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AGGREGATE_FUNCTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list27 = iprot.readListBegin();
struct.aggregate_functions = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(_list27.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr _elem28;
for (int _i29 = 0; _i29 < _list27.size; ++_i29)
{
_elem28 = new org.apache.doris.thrift.TExpr();
_elem28.read(iprot);
struct.aggregate_functions.add(_elem28);
}
iprot.readListEnd();
}
struct.setAggregateFunctionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // INTERMEDIATE_TUPLE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.intermediate_tuple_id = iprot.readI32();
struct.setIntermediateTupleIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // OUTPUT_TUPLE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.output_tuple_id = iprot.readI32();
struct.setOutputTupleIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // IS_FINALIZE
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.is_finalize = iprot.readBool();
struct.setIsFinalizeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // USE_STREAMING_PREAGGREGATION
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.use_streaming_preaggregation = iprot.readBool();
struct.setUseStreamingPreaggregationIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // PROJECT_TO_AGG_INTERMEDIATE_TUPLE
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list30 = iprot.readListBegin();
struct.projectToAggIntermediateTuple = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(_list30.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr _elem31;
for (int _i32 = 0; _i32 < _list30.size; ++_i32)
{
_elem31 = new org.apache.doris.thrift.TExpr();
_elem31.read(iprot);
struct.projectToAggIntermediateTuple.add(_elem31);
}
iprot.readListEnd();
}
struct.setProjectToAggIntermediateTupleIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // PROJECT_TO_AGG_OUTPUT_TUPLE
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list33 = iprot.readListBegin();
struct.projectToAggOutputTuple = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(_list33.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr _elem34;
for (int _i35 = 0; _i35 < _list33.size; ++_i35)
{
_elem34 = new org.apache.doris.thrift.TExpr();
_elem34.read(iprot);
struct.projectToAggOutputTuple.add(_elem34);
}
iprot.readListEnd();
}
struct.setProjectToAggOutputTupleIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // SORT_INFO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.sortInfo = new org.apache.doris.thrift.TSortInfo();
struct.sortInfo.read(iprot);
struct.setSortInfoIsSet(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, TNormalizedAggregateNode struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.grouping_exprs != null) {
if (struct.isSetGroupingExprs()) {
oprot.writeFieldBegin(GROUPING_EXPRS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.grouping_exprs.size()));
for (org.apache.doris.thrift.TExpr _iter36 : struct.grouping_exprs)
{
_iter36.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.aggregate_functions != null) {
if (struct.isSetAggregateFunctions()) {
oprot.writeFieldBegin(AGGREGATE_FUNCTIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.aggregate_functions.size()));
for (org.apache.doris.thrift.TExpr _iter37 : struct.aggregate_functions)
{
_iter37.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.isSetIntermediateTupleId()) {
oprot.writeFieldBegin(INTERMEDIATE_TUPLE_ID_FIELD_DESC);
oprot.writeI32(struct.intermediate_tuple_id);
oprot.writeFieldEnd();
}
if (struct.isSetOutputTupleId()) {
oprot.writeFieldBegin(OUTPUT_TUPLE_ID_FIELD_DESC);
oprot.writeI32(struct.output_tuple_id);
oprot.writeFieldEnd();
}
if (struct.isSetIsFinalize()) {
oprot.writeFieldBegin(IS_FINALIZE_FIELD_DESC);
oprot.writeBool(struct.is_finalize);
oprot.writeFieldEnd();
}
if (struct.isSetUseStreamingPreaggregation()) {
oprot.writeFieldBegin(USE_STREAMING_PREAGGREGATION_FIELD_DESC);
oprot.writeBool(struct.use_streaming_preaggregation);
oprot.writeFieldEnd();
}
if (struct.projectToAggIntermediateTuple != null) {
if (struct.isSetProjectToAggIntermediateTuple()) {
oprot.writeFieldBegin(PROJECT_TO_AGG_INTERMEDIATE_TUPLE_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.projectToAggIntermediateTuple.size()));
for (org.apache.doris.thrift.TExpr _iter38 : struct.projectToAggIntermediateTuple)
{
_iter38.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.projectToAggOutputTuple != null) {
if (struct.isSetProjectToAggOutputTuple()) {
oprot.writeFieldBegin(PROJECT_TO_AGG_OUTPUT_TUPLE_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.projectToAggOutputTuple.size()));
for (org.apache.doris.thrift.TExpr _iter39 : struct.projectToAggOutputTuple)
{
_iter39.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.sortInfo != null) {
if (struct.isSetSortInfo()) {
oprot.writeFieldBegin(SORT_INFO_FIELD_DESC);
struct.sortInfo.write(oprot);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TNormalizedAggregateNodeTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TNormalizedAggregateNodeTupleScheme getScheme() {
return new TNormalizedAggregateNodeTupleScheme();
}
}
private static class TNormalizedAggregateNodeTupleScheme extends org.apache.thrift.scheme.TupleScheme<TNormalizedAggregateNode> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TNormalizedAggregateNode 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.isSetGroupingExprs()) {
optionals.set(0);
}
if (struct.isSetAggregateFunctions()) {
optionals.set(1);
}
if (struct.isSetIntermediateTupleId()) {
optionals.set(2);
}
if (struct.isSetOutputTupleId()) {
optionals.set(3);
}
if (struct.isSetIsFinalize()) {
optionals.set(4);
}
if (struct.isSetUseStreamingPreaggregation()) {
optionals.set(5);
}
if (struct.isSetProjectToAggIntermediateTuple()) {
optionals.set(6);
}
if (struct.isSetProjectToAggOutputTuple()) {
optionals.set(7);
}
if (struct.isSetSortInfo()) {
optionals.set(8);
}
oprot.writeBitSet(optionals, 9);
if (struct.isSetGroupingExprs()) {
{
oprot.writeI32(struct.grouping_exprs.size());
for (org.apache.doris.thrift.TExpr _iter40 : struct.grouping_exprs)
{
_iter40.write(oprot);
}
}
}
if (struct.isSetAggregateFunctions()) {
{
oprot.writeI32(struct.aggregate_functions.size());
for (org.apache.doris.thrift.TExpr _iter41 : struct.aggregate_functions)
{
_iter41.write(oprot);
}
}
}
if (struct.isSetIntermediateTupleId()) {
oprot.writeI32(struct.intermediate_tuple_id);
}
if (struct.isSetOutputTupleId()) {
oprot.writeI32(struct.output_tuple_id);
}
if (struct.isSetIsFinalize()) {
oprot.writeBool(struct.is_finalize);
}
if (struct.isSetUseStreamingPreaggregation()) {
oprot.writeBool(struct.use_streaming_preaggregation);
}
if (struct.isSetProjectToAggIntermediateTuple()) {
{
oprot.writeI32(struct.projectToAggIntermediateTuple.size());
for (org.apache.doris.thrift.TExpr _iter42 : struct.projectToAggIntermediateTuple)
{
_iter42.write(oprot);
}
}
}
if (struct.isSetProjectToAggOutputTuple()) {
{
oprot.writeI32(struct.projectToAggOutputTuple.size());
for (org.apache.doris.thrift.TExpr _iter43 : struct.projectToAggOutputTuple)
{
_iter43.write(oprot);
}
}
}
if (struct.isSetSortInfo()) {
struct.sortInfo.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TNormalizedAggregateNode struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(9);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list44 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.grouping_exprs = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(_list44.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr _elem45;
for (int _i46 = 0; _i46 < _list44.size; ++_i46)
{
_elem45 = new org.apache.doris.thrift.TExpr();
_elem45.read(iprot);
struct.grouping_exprs.add(_elem45);
}
}
struct.setGroupingExprsIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list47 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.aggregate_functions = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(_list47.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr _elem48;
for (int _i49 = 0; _i49 < _list47.size; ++_i49)
{
_elem48 = new org.apache.doris.thrift.TExpr();
_elem48.read(iprot);
struct.aggregate_functions.add(_elem48);
}
}
struct.setAggregateFunctionsIsSet(true);
}
if (incoming.get(2)) {
struct.intermediate_tuple_id = iprot.readI32();
struct.setIntermediateTupleIdIsSet(true);
}
if (incoming.get(3)) {
struct.output_tuple_id = iprot.readI32();
struct.setOutputTupleIdIsSet(true);
}
if (incoming.get(4)) {
struct.is_finalize = iprot.readBool();
struct.setIsFinalizeIsSet(true);
}
if (incoming.get(5)) {
struct.use_streaming_preaggregation = iprot.readBool();
struct.setUseStreamingPreaggregationIsSet(true);
}
if (incoming.get(6)) {
{
org.apache.thrift.protocol.TList _list50 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.projectToAggIntermediateTuple = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(_list50.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr _elem51;
for (int _i52 = 0; _i52 < _list50.size; ++_i52)
{
_elem51 = new org.apache.doris.thrift.TExpr();
_elem51.read(iprot);
struct.projectToAggIntermediateTuple.add(_elem51);
}
}
struct.setProjectToAggIntermediateTupleIsSet(true);
}
if (incoming.get(7)) {
{
org.apache.thrift.protocol.TList _list53 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.projectToAggOutputTuple = new java.util.ArrayList<org.apache.doris.thrift.TExpr>(_list53.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TExpr _elem54;
for (int _i55 = 0; _i55 < _list53.size; ++_i55)
{
_elem54 = new org.apache.doris.thrift.TExpr();
_elem54.read(iprot);
struct.projectToAggOutputTuple.add(_elem54);
}
}
struct.setProjectToAggOutputTupleIsSet(true);
}
if (incoming.get(8)) {
struct.sortInfo = new org.apache.doris.thrift.TSortInfo();
struct.sortInfo.read(iprot);
struct.setSortInfoIsSet(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();
}
}