public AggImpState(int aggIdx, AggregateCall call, boolean windowContext) { this.aggIdx = aggIdx; this.call = call; this.implementor = RexImpTable.INSTANCE.get(call.getAggregation(), windowContext); if (implementor == null) { throw new IllegalArgumentException( "Unable to get aggregate implementation for aggregate " + call.getAggregation() + (windowContext ? " in window context" : "")); } } }
/** Translates a call to an operator or function. */ private Expression translateCall(RexCall call, RexImpTable.NullAs nullAs) { final SqlOperator operator = call.getOperator(); CallImplementor implementor = RexImpTable.INSTANCE.get(operator); if (implementor == null) { throw new RuntimeException("cannot translate call " + call); } return implementor.implement(this, call, nullAs); }
/** Translates a call to an operator or function. */ private Expression translateCall(RexCall call, RexImpTable.NullAs nullAs) { final SqlOperator operator = call.getOperator(); CallImplementor implementor = RexImpTable.INSTANCE.get(operator); if (implementor == null) { throw new RuntimeException("cannot translate call " + call); } return implementor.implement(this, call, nullAs); }
public AggImpState(int aggIdx, AggregateCall call, boolean windowContext) { this.aggIdx = aggIdx; this.call = call; this.implementor = RexImpTable.INSTANCE.get(call.getAggregation(), windowContext); if (implementor == null) { throw new IllegalArgumentException( "Unable to get aggregate implementation for aggregate " + call.getAggregation() + (windowContext ? " in window context" : "")); } } }
public EnumerableAggregate( RelOptCluster cluster, RelTraitSet traitSet, RelNode child, boolean indicator, ImmutableBitSet groupSet, List<ImmutableBitSet> groupSets, List<AggregateCall> aggCalls) throws InvalidRelException { super(cluster, traitSet, child, indicator, groupSet, groupSets, aggCalls); Preconditions.checkArgument(!indicator, "EnumerableAggregate no longer supports indicator fields"); assert getConvention() instanceof EnumerableConvention; for (AggregateCall aggCall : aggCalls) { if (aggCall.isDistinct()) { throw new InvalidRelException( "distinct aggregation not supported"); } AggImplementor implementor2 = RexImpTable.INSTANCE.get(aggCall.getAggregation(), false); if (implementor2 == null) { throw new InvalidRelException( "aggregation " + aggCall.getAggregation() + " not supported"); } } }
public EnumerableAggregate( RelOptCluster cluster, RelTraitSet traitSet, RelNode child, boolean indicator, ImmutableBitSet groupSet, List<ImmutableBitSet> groupSets, List<AggregateCall> aggCalls) throws InvalidRelException { super(cluster, traitSet, child, indicator, groupSet, groupSets, aggCalls); Preconditions.checkArgument(!indicator, "EnumerableAggregate no longer supports indicator fields"); assert getConvention() instanceof EnumerableConvention; for (AggregateCall aggCall : aggCalls) { if (aggCall.isDistinct()) { throw new InvalidRelException( "distinct aggregation not supported"); } AggImplementor implementor2 = RexImpTable.INSTANCE.get(aggCall.getAggregation(), false); if (implementor2 == null) { throw new InvalidRelException( "aggregation " + aggCall.getAggregation() + " not supported"); } } }
public BindableAggregate( RelOptCluster cluster, RelTraitSet traitSet, RelNode input, boolean indicator, ImmutableBitSet groupSet, List<ImmutableBitSet> groupSets, List<AggregateCall> aggCalls) throws InvalidRelException { super(cluster, traitSet, input, indicator, groupSet, groupSets, aggCalls); assert getConvention() instanceof BindableConvention; for (AggregateCall aggCall : aggCalls) { if (aggCall.isDistinct()) { throw new InvalidRelException( "distinct aggregation not supported"); } AggImplementor implementor2 = RexImpTable.INSTANCE.get(aggCall.getAggregation(), false); if (implementor2 == null) { throw new InvalidRelException( "aggregation " + aggCall.getAggregation() + " not supported"); } } }
public BindableAggregate( RelOptCluster cluster, RelTraitSet traitSet, RelNode input, boolean indicator, ImmutableBitSet groupSet, List<ImmutableBitSet> groupSets, List<AggregateCall> aggCalls) throws InvalidRelException { super(cluster, traitSet, input, indicator, groupSet, groupSets, aggCalls); assert getConvention() instanceof BindableConvention; for (AggregateCall aggCall : aggCalls) { if (aggCall.isDistinct()) { throw new InvalidRelException( "distinct aggregation not supported"); } AggImplementor implementor2 = RexImpTable.INSTANCE.get(aggCall.getAggregation(), false); if (implementor2 == null) { throw new InvalidRelException( "aggregation " + aggCall.getAggregation() + " not supported"); } } }