Package org.teiid.query.optimizer.relational

Examples of org.teiid.query.optimizer.relational.RelationalPlanner.generatePlan()


      Command command = TestOptimizer.helpGetCommand("select * from (select * from pm1.g1 union select * from pm1.g2) x where e1 = 1", metadata, null); //$NON-NLS-1$
      Command subCommand = TestOptimizer.helpGetCommand("select * from pm1.g1 union select * from pm1.g2", metadata, null); //$NON-NLS-1$
      RelationalPlanner p = new RelationalPlanner();
      CommandContext cc = new CommandContext();
      p.initialize(command, null, metadata, null, null, cc);
      PlanNode root = p.generatePlan(command);
      PlanNode child = p.generatePlan(subCommand);
      PlanNode sourceNode = NodeEditor.findNodePreOrder(root, NodeConstants.Types.SOURCE);
      sourceNode.addFirstChild(child);
        sourceNode.setProperty(NodeConstants.Info.SYMBOL_MAP, SymbolMap.createSymbolMap(sourceNode.getGroups().iterator().next(), (List<SingleElementSymbol>)child.getFirstChild().getProperty(Info.PROJECT_COLS), metadata));
      //add a dummy access node
View Full Code Here


      Command subCommand = TestOptimizer.helpGetCommand("select * from pm1.g1 union select * from pm1.g2", metadata, null); //$NON-NLS-1$
      RelationalPlanner p = new RelationalPlanner();
      CommandContext cc = new CommandContext();
      p.initialize(command, null, metadata, null, null, cc);
      PlanNode root = p.generatePlan(command);
      PlanNode child = p.generatePlan(subCommand);
      PlanNode sourceNode = NodeEditor.findNodePreOrder(root, NodeConstants.Types.SOURCE);
      sourceNode.addFirstChild(child);
        sourceNode.setProperty(NodeConstants.Info.SYMBOL_MAP, SymbolMap.createSymbolMap(sourceNode.getGroups().iterator().next(), (List<SingleElementSymbol>)child.getFirstChild().getProperty(Info.PROJECT_COLS), metadata));
      //add a dummy access node
        PlanNode accessNode = NodeFactory.getNewNode(NodeConstants.Types.ACCESS);
View Full Code Here

    QueryResolver.resolveCommand(query, METADATA);
   
    //Generate canonical plan
      RelationalPlanner p = new RelationalPlanner();
      p.initialize(query, null, METADATA, FINDER, null, new CommandContext());
      PlanNode planNode = p.generatePlan(query);
      RelationalPlanner planner = new RelationalPlanner();
    final RuleStack rules = planner.buildRules();

    PlanNode testPlan = helpExecuteRules(rules, planNode, METADATA, DEBUG);
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.