Package org.apache.calcite.rel.logical
Class LogicalAggregate
- java.lang.Object
-
- org.apache.calcite.rel.AbstractRelNode
-
- org.apache.calcite.rel.SingleRel
-
- org.apache.calcite.rel.core.Aggregate
-
- org.apache.calcite.rel.logical.LogicalAggregate
-
- All Implemented Interfaces:
java.lang.Cloneable
,RelOptNode
,RelNode
public final class LogicalAggregate extends Aggregate
LogicalAggregate
is a relational operator which eliminates duplicates and computes totals.Rules:
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.calcite.rel.core.Aggregate
Aggregate.AggCallBinding, Aggregate.Group
-
Nested classes/interfaces inherited from interface org.apache.calcite.rel.RelNode
RelNode.Context
-
-
Field Summary
-
Fields inherited from class org.apache.calcite.rel.core.Aggregate
aggCalls, groupSet, groupSets, indicator, IS_NOT_GRAND_TOTAL, IS_SIMPLE, NO_INDICATOR
-
Fields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet
-
-
Constructor Summary
Constructors Constructor Description LogicalAggregate(RelOptCluster cluster, RelTraitSet traitSet, RelNode child, boolean indicator, ImmutableBitSet groupSet, java.util.List<ImmutableBitSet> groupSets, java.util.List<AggregateCall> aggCalls)
Creates a LogicalAggregate.LogicalAggregate(RelOptCluster cluster, RelNode child, boolean indicator, ImmutableBitSet groupSet, java.util.List<ImmutableBitSet> groupSets, java.util.List<AggregateCall> aggCalls)
Deprecated.LogicalAggregate(RelInput input)
Creates a LogicalAggregate by parsing serialized output.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description RelNode
accept(RelShuttle shuttle)
Accepts a visit from a shuttle.LogicalAggregate
copy(RelTraitSet traitSet, RelNode input, boolean indicator, ImmutableBitSet groupSet, java.util.List<ImmutableBitSet> groupSets, java.util.List<AggregateCall> aggCalls)
Creates a copy of this aggregate.static LogicalAggregate
create(RelNode input, boolean indicator, ImmutableBitSet groupSet, java.util.List<ImmutableBitSet> groupSets, java.util.List<AggregateCall> aggCalls)
Deprecated.static LogicalAggregate
create(RelNode input, ImmutableBitSet groupSet, java.util.List<ImmutableBitSet> groupSets, java.util.List<AggregateCall> aggCalls)
Creates a LogicalAggregate.private static LogicalAggregate
create_(RelNode input, boolean indicator, ImmutableBitSet groupSet, java.util.List<ImmutableBitSet> groupSets, java.util.List<AggregateCall> aggCalls)
-
Methods inherited from class org.apache.calcite.rel.core.Aggregate
computeSelfCost, containsDistinctCall, copy, deriveRowType, deriveRowType, estimateRowCount, explainTerms, getAggCallList, getGroupCount, getGroupSet, getGroupSets, getGroupType, getIndicatorCount, getNamedAggCalls, isNotGrandTotal, isSimple, isValid, noIndicator
-
Methods inherited from class org.apache.calcite.rel.SingleRel
childrenAccept, getInput, getInputs, replaceInput
-
Methods inherited from class org.apache.calcite.rel.AbstractRelNode
accept, collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, explain, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getQuery, getRelTypeName, getRows, getRowType, getTable, getTraitSet, getVariablesSet, getVariablesStopped, isDistinct, isKey, isValid, metadata, onRegister, recomputeDigest, register, sole, toString
-
-
-
-
Constructor Detail
-
LogicalAggregate
public LogicalAggregate(RelOptCluster cluster, RelTraitSet traitSet, RelNode child, boolean indicator, ImmutableBitSet groupSet, java.util.List<ImmutableBitSet> groupSets, java.util.List<AggregateCall> aggCalls)
Creates a LogicalAggregate.Use
create(org.apache.calcite.rel.RelNode, org.apache.calcite.util.ImmutableBitSet, java.util.List<org.apache.calcite.util.ImmutableBitSet>, java.util.List<org.apache.calcite.rel.core.AggregateCall>)
unless you know what you're doing.- Parameters:
cluster
- Cluster that this relational expression belongs tochild
- input relational expressiongroupSet
- Bit set of grouping fieldsgroupSets
- Grouping sets, or null to use justgroupSet
aggCalls
- Array of aggregates to compute, not null
-
LogicalAggregate
@Deprecated public LogicalAggregate(RelOptCluster cluster, RelNode child, boolean indicator, ImmutableBitSet groupSet, java.util.List<ImmutableBitSet> groupSets, java.util.List<AggregateCall> aggCalls)
Deprecated.
-
LogicalAggregate
public LogicalAggregate(RelInput input)
Creates a LogicalAggregate by parsing serialized output.
-
-
Method Detail
-
create
public static LogicalAggregate create(RelNode input, ImmutableBitSet groupSet, java.util.List<ImmutableBitSet> groupSets, java.util.List<AggregateCall> aggCalls)
Creates a LogicalAggregate.
-
create
@Deprecated public static LogicalAggregate create(RelNode input, boolean indicator, ImmutableBitSet groupSet, java.util.List<ImmutableBitSet> groupSets, java.util.List<AggregateCall> aggCalls)
Deprecated.
-
create_
private static LogicalAggregate create_(RelNode input, boolean indicator, ImmutableBitSet groupSet, java.util.List<ImmutableBitSet> groupSets, java.util.List<AggregateCall> aggCalls)
-
copy
public LogicalAggregate copy(RelTraitSet traitSet, RelNode input, boolean indicator, ImmutableBitSet groupSet, java.util.List<ImmutableBitSet> groupSets, java.util.List<AggregateCall> aggCalls)
Description copied from class:Aggregate
Creates a copy of this aggregate.- Specified by:
copy
in classAggregate
- Parameters:
traitSet
- Traitsinput
- Inputindicator
- Whether row type should include indicator fields to indicate which grouping set is active; must be true if aggregate is not simplegroupSet
- Bit set of grouping fieldsgroupSets
- List of all grouping sets; null for justgroupSet
aggCalls
- Collection of calls to aggregate functions- Returns:
- New
Aggregate
if any parameter differs from the value of thisAggregate
, or justthis
if all the parameters are the same - See Also:
Aggregate.copy(org.apache.calcite.plan.RelTraitSet, java.util.List)
-
accept
public RelNode accept(RelShuttle shuttle)
Description copied from interface:RelNode
Accepts a visit from a shuttle.- Specified by:
accept
in interfaceRelNode
- Overrides:
accept
in classAbstractRelNode
- Parameters:
shuttle
- Shuttle- Returns:
- A copy of this node incorporating changes made by the shuttle to this node's children
-
-