/** * Creates a simple planner that can plan "select * from myTable" but not * much more. */ protected RelOptPlanner createTapPlanner() { final VolcanoPlanner planner = new VolcanoPlanner(); planner.addRelTraitDef( Cascading.CONVENTION.getTraitDef() ); planner.addRelTraitDef( ConventionTraitDef.instance ); planner.addRule( TableAccessRule.instance ); planner.addRule( JavaRules.ENUMERABLE_CALC_RULE ); planner.addRule( ProjectToCalcRule.instance ); planner.addRule( EnumerableTapRule.INSTANCE ); planner.setLocked( true ); // prevent further rules being added return planner; } }