Class GroupByLevelNode
- java.lang.Object
-
- org.apache.iotdb.db.mpp.plan.planner.plan.node.PlanNode
-
- org.apache.iotdb.db.mpp.plan.planner.plan.node.process.ProcessNode
-
- org.apache.iotdb.db.mpp.plan.planner.plan.node.process.MultiChildNode
-
- org.apache.iotdb.db.mpp.plan.planner.plan.node.process.GroupByLevelNode
-
- All Implemented Interfaces:
org.apache.iotdb.consensus.common.request.IConsensusRequest
public class GroupByLevelNode extends MultiChildNode
This node is responsible for the final aggregation merge operation. It will process the data from TsBlock row by row. For one row, it will rollup the fields which have the same aggregate function and belong to one bucket. Here, that two columns belong to one bucket means the partial paths of device after rolling up in specific level are the same.For example, let's say there are two columns `root.sg.d1.s1` and `root.sg.d2.s1`.
If the group by level parameter is [0, 1], then these two columns will belong to one bucket and the bucket name is `root.sg.*.s1`.
If the group by level parameter is [0, 2], then these two columns will not belong to one bucket. And the total buckets are `root.*.d1.s1` and `root.*.d2.s1`
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<GroupByLevelDescriptor>groupByLevelDescriptorsprotected GroupByTimeParametergroupByTimeParameterprotected OrderingscanOrder-
Fields inherited from class org.apache.iotdb.db.mpp.plan.planner.plan.node.process.MultiChildNode
children
-
Fields inherited from class org.apache.iotdb.db.mpp.plan.planner.plan.node.PlanNode
CHILD_COUNT_NO_LIMIT, NO_CHILD_ALLOWED, ONE_CHILD
-
-
Constructor Summary
Constructors Constructor Description GroupByLevelNode(PlanNodeId id, java.util.List<PlanNode> children, java.util.List<GroupByLevelDescriptor> groupByLevelDescriptors, GroupByTimeParameter groupByTimeParameter, Ordering scanOrder)GroupByLevelNode(PlanNodeId id, java.util.List<GroupByLevelDescriptor> groupByLevelDescriptors, GroupByTimeParameter groupByTimeParameter, Ordering scanOrder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <R,C>
Raccept(PlanVisitor<R,C> visitor, C context)voidaddChild(PlanNode child)intallowedChildCount()PlanNodeclone()static GroupByLevelNodedeserialize(java.nio.ByteBuffer byteBuffer)booleanequals(java.lang.Object o)java.util.List<PlanNode>getChildren()java.util.List<GroupByLevelDescriptor>getGroupByLevelDescriptors()GroupByTimeParametergetGroupByTimeParameter()java.util.List<java.lang.String>getOutputColumnNames()OrderinggetScanOrder()inthashCode()protected voidserializeAttributes(java.io.DataOutputStream stream)protected voidserializeAttributes(java.nio.ByteBuffer byteBuffer)voidsetGroupByLevelDescriptors(java.util.List<GroupByLevelDescriptor> groupByLevelDescriptors)java.lang.StringtoString()-
Methods inherited from class org.apache.iotdb.db.mpp.plan.planner.plan.node.process.MultiChildNode
setChildren
-
Methods inherited from class org.apache.iotdb.db.mpp.plan.planner.plan.node.PlanNode
cloneWithChildren, getPlanNodeId, serialize, serialize, serializeToByteBuffer, setPlanNodeId
-
-
-
-
Field Detail
-
groupByLevelDescriptors
protected java.util.List<GroupByLevelDescriptor> groupByLevelDescriptors
-
groupByTimeParameter
@Nullable protected GroupByTimeParameter groupByTimeParameter
-
scanOrder
protected Ordering scanOrder
-
-
Constructor Detail
-
GroupByLevelNode
public GroupByLevelNode(PlanNodeId id, java.util.List<PlanNode> children, java.util.List<GroupByLevelDescriptor> groupByLevelDescriptors, GroupByTimeParameter groupByTimeParameter, Ordering scanOrder)
-
GroupByLevelNode
public GroupByLevelNode(PlanNodeId id, java.util.List<GroupByLevelDescriptor> groupByLevelDescriptors, GroupByTimeParameter groupByTimeParameter, Ordering scanOrder)
-
-
Method Detail
-
getChildren
public java.util.List<PlanNode> getChildren()
- Specified by:
getChildrenin classPlanNode
-
allowedChildCount
public int allowedChildCount()
- Specified by:
allowedChildCountin classPlanNode
-
getGroupByLevelDescriptors
public java.util.List<GroupByLevelDescriptor> getGroupByLevelDescriptors()
-
setGroupByLevelDescriptors
public void setGroupByLevelDescriptors(java.util.List<GroupByLevelDescriptor> groupByLevelDescriptors)
-
getOutputColumnNames
public java.util.List<java.lang.String> getOutputColumnNames()
- Specified by:
getOutputColumnNamesin classPlanNode
-
accept
public <R,C> R accept(PlanVisitor<R,C> visitor, C context)
-
serializeAttributes
protected void serializeAttributes(java.nio.ByteBuffer byteBuffer)
- Specified by:
serializeAttributesin classPlanNode
-
serializeAttributes
protected void serializeAttributes(java.io.DataOutputStream stream) throws java.io.IOException- Specified by:
serializeAttributesin classPlanNode- Throws:
java.io.IOException
-
deserialize
public static GroupByLevelNode deserialize(java.nio.ByteBuffer byteBuffer)
-
getGroupByTimeParameter
@Nullable public GroupByTimeParameter getGroupByTimeParameter()
-
getScanOrder
public Ordering getScanOrder()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classMultiChildNode
-
hashCode
public int hashCode()
- Overrides:
hashCodein classMultiChildNode
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-