use of org.apache.calcite.adapter.jdbc.JdbcRules.JdbcAggregate in project hive by apache.
the class JDBCAggregationPushDownRule method onMatch.
@Override
public void onMatch(RelOptRuleCall call) {
LOG.debug("JDBCAggregationPushDownRule has been called");
final HiveAggregate aggregate = call.rel(0);
final HiveJdbcConverter converter = call.rel(1);
JdbcAggregate jdbcAggregate;
try {
jdbcAggregate = new JdbcAggregate(aggregate.getCluster(), aggregate.getTraitSet().replace(converter.getJdbcConvention()), converter.getInput(), aggregate.indicator, aggregate.getGroupSet(), aggregate.getGroupSets(), aggregate.getAggCallList());
} catch (InvalidRelException e) {
LOG.warn(e.toString());
return;
}
call.transformTo(converter.copy(converter.getTraitSet(), jdbcAggregate));
}
Aggregations