@Override public JdbcAggregate copy(RelTraitSet traitSet, RelNode input, boolean indicator, ImmutableBitSet groupSet, List<ImmutableBitSet> groupSets, List<AggregateCall> aggCalls) { try { return new JdbcAggregate(getCluster(), traitSet, input, indicator, groupSet, groupSets, aggCalls); } catch (InvalidRelException e) { // Semantic error not possible. Must be a bug. Convert to // internal error. throw new AssertionError(e); } }
public JdbcAggregate( 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 JdbcConvention; assert this.groupSets.size() == 1 : "Grouping sets not supported"; assert !this.indicator; final SqlDialect dialect = ((JdbcConvention) getConvention()).dialect; for (AggregateCall aggCall : aggCalls) { if (!canImplement(aggCall.getAggregation(), dialect)) { throw new InvalidRelException("cannot implement aggregate function " + aggCall.getAggregation()); } } }
public JdbcAggregate( 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 JdbcConvention; assert this.groupSets.size() == 1 : "Grouping sets not supported"; assert !this.indicator; final SqlDialect dialect = ((JdbcConvention) getConvention()).dialect; for (AggregateCall aggCall : aggCalls) { if (!canImplement(aggCall.getAggregation(), dialect)) { throw new InvalidRelException("cannot implement aggregate function " + aggCall.getAggregation()); } } }
public RelNode convert(RelNode rel) { final Aggregate agg = (Aggregate) rel; if (agg.getGroupSets().size() != 1) { // GROUPING SETS not supported; see // [CALCITE-734] Push GROUPING SETS to underlying SQL via JDBC adapter return null; } final RelTraitSet traitSet = agg.getTraitSet().replace(out); try { return new JdbcAggregate(rel.getCluster(), traitSet, convert(agg.getInput(), out), agg.indicator, agg.getGroupSet(), agg.getGroupSets(), agg.getAggCallList()); } catch (InvalidRelException e) { LOGGER.debug(e.toString()); return null; } } }
public RelNode convert(RelNode rel) { final Aggregate agg = (Aggregate) rel; if (agg.getGroupSets().size() != 1) { // GROUPING SETS not supported; see // [CALCITE-734] Push GROUPING SETS to underlying SQL via JDBC adapter return null; } final RelTraitSet traitSet = agg.getTraitSet().replace(out); try { return new JdbcAggregate(rel.getCluster(), traitSet, convert(agg.getInput(), out), agg.indicator, agg.getGroupSet(), agg.getGroupSets(), agg.getAggCallList()); } catch (InvalidRelException e) { LOGGER.debug(e.toString()); return null; } } }
@Override public JdbcAggregate copy(RelTraitSet traitSet, RelNode input, boolean indicator, ImmutableBitSet groupSet, List<ImmutableBitSet> groupSets, List<AggregateCall> aggCalls) { try { return new JdbcAggregate(getCluster(), traitSet, input, indicator, groupSet, groupSets, aggCalls); } catch (InvalidRelException e) { // Semantic error not possible. Must be a bug. Convert to // internal error. throw new AssertionError(e); } }