private static LogicalAggregate create_(final RelNode input, boolean indicator, ImmutableBitSet groupSet, List<ImmutableBitSet> groupSets, List<AggregateCall> aggCalls) { final RelOptCluster cluster = input.getCluster(); final RelTraitSet traitSet = cluster.traitSetOf(Convention.NONE); return new LogicalAggregate(cluster, traitSet, input, indicator, groupSet, groupSets, aggCalls); }
private static LogicalAggregate create_(final RelNode input, boolean indicator, ImmutableBitSet groupSet, List<ImmutableBitSet> groupSets, List<AggregateCall> aggCalls) { final RelOptCluster cluster = input.getCluster(); final RelTraitSet traitSet = cluster.traitSetOf(Convention.NONE); return new LogicalAggregate(cluster, traitSet, input, indicator, groupSet, groupSets, aggCalls); }
@Override public LogicalAggregate copy(RelTraitSet traitSet, RelNode input, boolean indicator, ImmutableBitSet groupSet, List<ImmutableBitSet> groupSets, List<AggregateCall> aggCalls) { assert traitSet.containsIfApplicable(Convention.NONE); return new LogicalAggregate(getCluster(), traitSet, input, indicator, groupSet, groupSets, aggCalls); }
@Override public LogicalAggregate copy(RelTraitSet traitSet, RelNode input, boolean indicator, ImmutableBitSet groupSet, List<ImmutableBitSet> groupSets, List<AggregateCall> aggCalls) { assert traitSet.containsIfApplicable(Convention.NONE); return new LogicalAggregate(getCluster(), traitSet, input, indicator, groupSet, groupSets, aggCalls); }
/** * Do a shallow clone of oldAggRel and update aggCalls. Could be refactored * into Aggregate and subclasses - but it's only needed for some * subclasses. * * @param oldAggRel AggregateRel to clone. * @param inputRel Input relational expression * @param newCalls New list of AggregateCalls * @return shallow clone with new list of AggregateCalls. */ protected Aggregate newAggregateRel( Aggregate oldAggRel, RelNode inputRel, List<AggregateCall> newCalls) { RelOptCluster cluster = inputRel.getCluster(); return new LogicalAggregate(cluster, cluster.traitSetOf(Convention.NONE), inputRel, oldAggRel.indicator, oldAggRel.getGroupSet(), oldAggRel.getGroupSets(), newCalls); }
@Override public RelNode visit(LogicalAggregate aggregate) { final RelNode input = aggregate.getInput().accept(this); return new LogicalAggregate( cluster, copyOf(aggregate.getTraitSet()), input, aggregate.indicator, aggregate.getGroupSet(), aggregate.getGroupSets(), copyOf(aggregate.getAggCallList()) ); }
RelNode agg = new LogicalAggregate(cluster, cluster.traitSetOf(Convention.NONE), project, false, ImmutableBitSet.of(0), null, Collections.singletonList(aggCall));
false, false, Collections.singletonList(1), -1, RelCollations.EMPTY, sqlBigInt, "cnt"); RelNode agg = new LogicalAggregate(cluster, cluster.traitSetOf(Convention.NONE), project, false, ImmutableBitSet.of(0), null, Collections.singletonList(aggCall));