@Test public final void testInsertInto() throws CloneNotSupportedException, PlanningException { Expr expr = sqlAnalyzer.parse(TestLogicalPlanner.insertStatements[0]); LogicalPlan newPlan = planner.createPlan(expr); optimizer.optimize(newPlan); }
public LogicalNode optimize(LogicalPlan plan) throws PlanningException { rulesBeforeJoinOpt.rewrite(plan); DirectedGraphCursor<String, BlockEdge> blockCursor = new DirectedGraphCursor<String, BlockEdge>(plan.getQueryBlockGraph(), plan.getRootBlock().getName()); while(blockCursor.hasNext()) { optimizeJoinOrder(plan, blockCursor.nextBlock()); } rulesAfterToJoinOpt.rewrite(plan); return plan.getRootBlock().getRoot(); }
LogicalOptimizer { public LogicalNode optimize(LogicalPlan plan) throws PlanningException { rulesBeforeJoinOpt.rewrite(plan); DirectedGraphCursor<String, BlockEdge> blockCursor = new DirectedGraphCursor<String, BlockEdge>(plan.getQueryBlockGraph(), plan.getRootBlock().getName()); while(blockCursor.hasNext()) { optimizeJoinOrder(plan, blockCursor.nextBlock()); } rulesAfterToJoinOpt.rewrite(plan); return plan.getRootBlock().getRoot(); } }
LogicalOptimizer { public LogicalNode optimize(LogicalPlan plan) throws PlanningException { rulesBeforeJoinOpt.rewrite(plan); DirectedGraphCursor<String, BlockEdge> blockCursor = new DirectedGraphCursor<String, BlockEdge>(plan.getQueryBlockGraph(), plan.getRootBlock().getName()); while(blockCursor.hasNext()) { optimizeJoinOrder(plan, blockCursor.nextBlock()); } rulesAfterToJoinOpt.rewrite(plan); return plan.getRootBlock().getRoot(); } LogicalOptimizer(TajoConf systemConf); }
LogicalOptimizer { public LogicalNode optimize(LogicalPlan plan) throws PlanningException { rulesBeforeJoinOpt.rewrite(plan); DirectedGraphCursor<String, BlockEdge> blockCursor = new DirectedGraphCursor<String, BlockEdge>(plan.getQueryBlockGraph(), plan.getRootBlock().getName()); while(blockCursor.hasNext()) { optimizeJoinOrder(plan, blockCursor.nextBlock()); } rulesAfterToJoinOpt.rewrite(plan); return plan.getRootBlock().getRoot(); } LogicalOptimizer(TajoConf systemConf); LogicalNode optimize(LogicalPlan plan); }
LogicalOptimizer { public LogicalNode optimize(LogicalPlan plan) throws PlanningException { rulesBeforeJoinOpt.rewrite(plan); DirectedGraphCursor<String, BlockEdge> blockCursor = new DirectedGraphCursor<String, BlockEdge>(plan.getQueryBlockGraph(), plan.getRootBlock().getName()); while(blockCursor.hasNext()) { optimizeJoinOrder(plan, blockCursor.nextBlock()); } rulesAfterToJoinOpt.rewrite(plan); return plan.getRootBlock().getRoot(); } LogicalOptimizer(TajoConf systemConf); LogicalNode optimize(LogicalPlan plan);  }