Hello,
I want to create a rule that pushes a filter through another filter ( I
don't merge them) according to their selectivities to optimize the final
plan. I am using other rules as templates to create it but I keep getting
errors, as I haven't understood correctly the basics. I want to have
something like this :
public void onMatch(RelOptRuleCall call) {
final Filter filter = call.rel(0);
final Filter secFilter = call.rel(1);
final RelBuilder relBuilder = call.builder();
relBuilder.push(filter)
.filter(secFilter.getCondition())
.build();
call.transformTo(relBuilder.build());
}