new TrimFieldsProgram(), program1,
/** Returns the standard program with user metadata provider. */ public static Program standard(RelMetadataProvider metadataProvider) { final Program program1 = (planner, rel, requiredOutputTraits, materializations, lattices) -> { planner.setRoot(rel); for (RelOptMaterialization materialization : materializations) { planner.addMaterialization(materialization); } for (RelOptLattice lattice : lattices) { planner.addLattice(lattice); } final RelNode rootRel2 = rel.getTraitSet().equals(requiredOutputTraits) ? rel : planner.changeTraits(rel, requiredOutputTraits); assert rootRel2 != null; planner.setRoot(rootRel2); final RelOptPlanner planner2 = planner.chooseDelegate(); final RelNode rootRel3 = planner2.findBestExp(); assert rootRel3 != null : "could not implement exp"; return rootRel3; }; return sequence(subQuery(metadataProvider), new DecorrelateProgram(), new TrimFieldsProgram(), program1, // Second planner pass to do physical "tweaks". This the first time // that EnumerableCalcRel is introduced. calc(metadataProvider)); }
/** Returns the standard program with user metadata provider. */ public static Program standard(RelMetadataProvider metadataProvider) { final Program program1 = (planner, rel, requiredOutputTraits, materializations, lattices) -> { planner.setRoot(rel); for (RelOptMaterialization materialization : materializations) { planner.addMaterialization(materialization); } for (RelOptLattice lattice : lattices) { planner.addLattice(lattice); } final RelNode rootRel2 = rel.getTraitSet().equals(requiredOutputTraits) ? rel : planner.changeTraits(rel, requiredOutputTraits); assert rootRel2 != null; planner.setRoot(rootRel2); final RelOptPlanner planner2 = planner.chooseDelegate(); final RelNode rootRel3 = planner2.findBestExp(); assert rootRel3 != null : "could not implement exp"; return rootRel3; }; return sequence(subQuery(metadataProvider), new DecorrelateProgram(), new TrimFieldsProgram(), program1, // Second planner pass to do physical "tweaks". This the first time // that EnumerableCalcRel is introduced. calc(metadataProvider)); }