use of org.apache.calcite.rel.rules.FilterJoinRule.FilterIntoJoinRule in project calcite by apache.
the class PigRelBuilderStyleTest method getVolcanoPlanner.
private RelOptPlanner getVolcanoPlanner(RelNode root) {
final RelBuilderFactory builderFactory = RelBuilder.proto(PigRelFactories.ALL_PIG_REL_FACTORIES);
// VolcanoPlanner
final RelOptPlanner planner = root.getCluster().getPlanner();
for (RelOptRule r : PigRules.ALL_PIG_OPT_RULES) {
planner.addRule(r);
}
planner.removeRule(FilterAggregateTransposeRule.INSTANCE);
planner.removeRule(FilterJoinRule.FILTER_ON_JOIN);
planner.addRule(new FilterAggregateTransposeRule(PigFilter.class, builderFactory, PigAggregate.class));
planner.addRule(new FilterIntoJoinRule(true, builderFactory, TRUE_PREDICATE));
planner.setRoot(root);
return planner;
}
Aggregations