Class LimitNode
- 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.LimitNode
-
- All Implemented Interfaces:
org.apache.iotdb.consensus.common.request.IConsensusRequest
public class LimitNode extends ProcessNode
LimitNode is used to select top n result. It uses the default order of upstream nodes
-
-
Field Summary
-
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 LimitNode(PlanNodeId id, int limit)LimitNode(PlanNodeId id, PlanNode child, int limit)
-
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 LimitNodedeserialize(java.nio.ByteBuffer byteBuffer)booleanequals(java.lang.Object o)PlanNodegetChild()java.util.List<PlanNode>getChildren()intgetLimit()java.util.List<java.lang.String>getOutputColumnNames()inthashCode()protected voidserializeAttributes(java.io.DataOutputStream stream)protected voidserializeAttributes(java.nio.ByteBuffer byteBuffer)voidsetChild(PlanNode child)java.lang.StringtoString()-
Methods inherited from class org.apache.iotdb.db.mpp.plan.planner.plan.node.PlanNode
cloneWithChildren, getPlanNodeId, serialize, serialize, serializeToByteBuffer, setPlanNodeId
-
-
-
-
Constructor Detail
-
LimitNode
public LimitNode(PlanNodeId id, int limit)
-
LimitNode
public LimitNode(PlanNodeId id, PlanNode child, int limit)
-
-
Method Detail
-
getLimit
public int getLimit()
-
getChild
public PlanNode getChild()
-
setChild
public void setChild(PlanNode child)
-
getChildren
public java.util.List<PlanNode> getChildren()
- Specified by:
getChildrenin classPlanNode
-
allowedChildCount
public int allowedChildCount()
- Specified by:
allowedChildCountin classPlanNode
-
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 LimitNode deserialize(java.nio.ByteBuffer byteBuffer)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-