Package io.trino.sql.planner.plan
Class AggregationNode
- java.lang.Object
-
- io.trino.sql.planner.plan.PlanNode
-
- io.trino.sql.planner.plan.AggregationNode
-
@Immutable public class AggregationNode extends PlanNode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAggregationNode.Aggregationstatic classAggregationNode.GroupingSetDescriptorstatic classAggregationNode.Step
-
Constructor Summary
Constructors Constructor Description AggregationNode(PlanNodeId id, PlanNode source, Map<Symbol,AggregationNode.Aggregation> aggregations, AggregationNode.GroupingSetDescriptor groupingSets, List<Symbol> preGroupedSymbols, AggregationNode.Step step, Optional<Symbol> hashSymbol, Optional<Symbol> groupIdSymbol)
-
Method Summary
-
-
-
Constructor Detail
-
AggregationNode
public AggregationNode(PlanNodeId id, PlanNode source, Map<Symbol,AggregationNode.Aggregation> aggregations, AggregationNode.GroupingSetDescriptor groupingSets, List<Symbol> preGroupedSymbols, AggregationNode.Step step, Optional<Symbol> hashSymbol, Optional<Symbol> groupIdSymbol)
-
-
Method Detail
-
getGroupingSets
public AggregationNode.GroupingSetDescriptor getGroupingSets()
-
hasDefaultOutput
public boolean hasDefaultOutput()
- Returns:
- whether this node should produce default output in case of no input pages.
For example for query:
SELECT count(*) FROM nation WHERE nationkey < 0
A default output of "0" is expected to be produced by FINAL aggregation operator.
-
hasEmptyGroupingSet
public boolean hasEmptyGroupingSet()
-
hasNonEmptyGroupingSet
public boolean hasNonEmptyGroupingSet()
-
getSources
public List<PlanNode> getSources()
- Specified by:
getSourcesin classPlanNode
-
getOutputSymbols
public List<Symbol> getOutputSymbols()
- Specified by:
getOutputSymbolsin classPlanNode
-
getAggregations
public Map<Symbol,AggregationNode.Aggregation> getAggregations()
-
getGroupingSetCount
public int getGroupingSetCount()
-
getSource
public PlanNode getSource()
-
getStep
public AggregationNode.Step getStep()
-
hasOrderings
public boolean hasOrderings()
-
accept
public <R,C> R accept(PlanVisitor<R,C> visitor, C context)
-
replaceChildren
public PlanNode replaceChildren(List<PlanNode> newChildren)
- Specified by:
replaceChildrenin classPlanNode
-
producesDistinctRows
public boolean producesDistinctRows()
-
isDecomposable
public boolean isDecomposable(Metadata metadata)
-
hasSingleNodeExecutionPreference
public boolean hasSingleNodeExecutionPreference(Metadata metadata)
-
isStreamable
public boolean isStreamable()
-
globalAggregation
public static AggregationNode.GroupingSetDescriptor globalAggregation()
-
singleGroupingSet
public static AggregationNode.GroupingSetDescriptor singleGroupingSet(List<Symbol> groupingKeys)
-
groupingSets
public static AggregationNode.GroupingSetDescriptor groupingSets(List<Symbol> groupingKeys, int groupingSetCount, Set<Integer> globalGroupingSets)
-
-