@Immutable public final class LimitNode extends PlanNode
| Modifier and Type | Class and Description |
|---|---|
static class |
LimitNode.Step
Stages of `LimitNode`:
PARTIAL: `LimitNode` is in the distributed plan and generates partial results on local workers.
|
| Constructor and Description |
|---|
LimitNode(Optional<SourceLocation> sourceLocation,
PlanNodeId id,
Optional<PlanNode> statsEquivalentPlanNode,
PlanNode source,
long count,
LimitNode.Step step) |
LimitNode(Optional<SourceLocation> sourceLocation,
PlanNodeId id,
PlanNode source,
long count,
LimitNode.Step step) |
| Modifier and Type | Method and Description |
|---|---|
<R,C> R |
accept(PlanVisitor<R,C> visitor,
C context)
A visitor pattern interface to operate on IR.
|
PlanNode |
assignStatsEquivalentPlanNode(Optional<PlanNode> statsEquivalentPlanNode)
Assigns statsEquivalentPlanNode to the plan node
|
LogicalProperties |
computeLogicalProperties(LogicalPropertiesProvider logicalPropertiesProvider)
Logical properties are a function of source properties and the operation performed by the plan node
|
long |
getCount()
Get the limit `N` number of results to return.
|
List<VariableReferenceExpression> |
getOutputVariables()
The output from the upstream PlanNodes.
|
PlanNode |
getSource()
LimitNode only expects a single upstream PlanNode.
|
List<PlanNode> |
getSources()
Get the upstream PlanNodes (i.e., children) of the current PlanNode.
|
LimitNode.Step |
getStep() |
boolean |
isPartial() |
PlanNode |
replaceChildren(List<PlanNode> newChildren)
Alter the upstream PlanNodes of the current PlanNode.
|
getId, getSourceLocation, getStatsEquivalentPlanNodepublic LimitNode(Optional<SourceLocation> sourceLocation, PlanNodeId id, PlanNode source, long count, LimitNode.Step step)
public LimitNode(Optional<SourceLocation> sourceLocation, PlanNodeId id, Optional<PlanNode> statsEquivalentPlanNode, PlanNode source, long count, LimitNode.Step step)
public List<PlanNode> getSources()
PlanNodegetSources in class PlanNodepublic PlanNode getSource()
public long getCount()
public LimitNode.Step getStep()
public boolean isPartial()
public LogicalProperties computeLogicalProperties(LogicalPropertiesProvider logicalPropertiesProvider)
PlanNodecomputeLogicalProperties in class PlanNodepublic List<VariableReferenceExpression> getOutputVariables()
PlanNodegetOutputVariables in class PlanNodepublic <R,C> R accept(PlanVisitor<R,C> visitor, C context)
PlanNodepublic PlanNode assignStatsEquivalentPlanNode(Optional<PlanNode> statsEquivalentPlanNode)
PlanNodeassignStatsEquivalentPlanNode in class PlanNodeCopyright © 2012–2022. All rights reserved.