use of org.apache.calcite.adapter.jdbc.JdbcRules.JdbcJoin in project drill by apache.
the class PhoenixJoinRule method convert.
@Override
public RelNode convert(RelNode rel) {
final List<RelNode> newInputs = new ArrayList<>();
final Join join = (Join) rel;
for (RelNode input : join.getInputs()) {
if (input.getConvention() != getOutTrait()) {
input = convert(input, input.getTraitSet().replace(out));
}
newInputs.add(input);
}
try {
JdbcJoin jdbcJoin = new JdbcJoin(join.getCluster(), join.getTraitSet().replace(out), newInputs.get(0), newInputs.get(1), join.getCondition(), join.getVariablesSet(), join.getJoinType());
return jdbcJoin;
} catch (InvalidRelException e) {
return null;
}
}
Aggregations