Examples of addFirstChild()


Examples of org.teiid.query.optimizer.relational.plantree.PlanNode.addFirstChild()

       
        PlanNode outerJoin = NodeFactory.getNewNode(NodeConstants.Types.JOIN);
       
        outerJoin.setProperty(NodeConstants.Info.JOIN_TYPE, JoinType.JOIN_LEFT_OUTER);
       
        outerJoin.addFirstChild(joinRoot);
        outerJoin.addFirstChild(joinRoot1);
       
        PlanNode source = NodeFactory.getNewNode(NodeConstants.Types.SOURCE);
       
        source.addFirstChild(outerJoin);
View Full Code Here

Examples of org.teiid.query.optimizer.relational.plantree.PlanNode.addFirstChild()

        PlanNode outerJoin = NodeFactory.getNewNode(NodeConstants.Types.JOIN);
       
        outerJoin.setProperty(NodeConstants.Info.JOIN_TYPE, JoinType.JOIN_LEFT_OUTER);
       
        outerJoin.addFirstChild(joinRoot);
        outerJoin.addFirstChild(joinRoot1);
       
        PlanNode source = NodeFactory.getNewNode(NodeConstants.Types.SOURCE);
       
        source.addFirstChild(outerJoin);
       
View Full Code Here

Examples of org.teiid.query.optimizer.relational.plantree.PlanNode.addFirstChild()

        outerJoin.addFirstChild(joinRoot);
        outerJoin.addFirstChild(joinRoot1);
       
        PlanNode source = NodeFactory.getNewNode(NodeConstants.Types.SOURCE);
       
        source.addFirstChild(outerJoin);
       
        RulePlanJoins.findJoinRegions(source, null, regions);
       
        assertEquals(3, regions.size());
       
View Full Code Here

Examples of org.teiid.query.optimizer.relational.plantree.PlanNode.addFirstChild()

       
        PlanNode joinRoot = TestFrameUtil.getExamplePlan();
       
        PlanNode source = NodeFactory.getNewNode(NodeConstants.Types.SOURCE);
       
        source.addFirstChild(joinRoot);
       
        RulePlanJoins.findJoinRegions(source, null, regions);
       
        assertEquals(1, regions.size());
       
View Full Code Here

Examples of org.teiid.query.optimizer.relational.plantree.PlanNode.addFirstChild()

                    //build a new join node
                    PlanNode joinNode = createJoinNode();
                    joinNode.getGroups().addAll(accessNode1.getGroups());
                    joinNode.getGroups().addAll(accessNode2.getGroups());
                    joinNode.addFirstChild(accessNode2);
                    joinNode.addLastChild(accessNode1);
                    joinNode.setProperty(NodeConstants.Info.JOIN_TYPE, joinType);
                    joinNode.setProperty(NodeConstants.Info.JOIN_CRITERIA, joinCriteria);

                    PlanNode newAccess = RuleRaiseAccess.raiseAccessOverJoin(joinNode, entry.getKey(), false);
View Full Code Here

Examples of org.teiid.query.optimizer.relational.plantree.PlanNode.addFirstChild()

            return null;
          }
        }
        grandParent.removeChild(selectRoot);
        if (isLeft) {
          grandParent.addFirstChild(accessNode);
        } else {
          grandParent.addLastChild(accessNode);
        }
          PlanNode newParent = grandParent.getParent();
        //TODO: use costing or heuristics instead of always raising
View Full Code Here

Examples of org.teiid.query.optimizer.relational.plantree.PlanNode.addFirstChild()

        RulePlaceAccess.copyDependentHints(joinNode, newAccess);
       
        if (insert) {
            joinNode.addAsParent(newAccess);
        } else {
            newAccess.addFirstChild(joinNode);
        }
       
        return newAccess;
  }
View Full Code Here

Examples of org.teiid.query.optimizer.relational.plantree.PlanNode.addFirstChild()

       
            for (Map.Entry<PlanNode, PlanNode> entry : combined.entrySet()) {
                PlanNode joinSourceRoot = entry.getValue();
                if (root.getChildCount() == 2) {
                    PlanNode parentJoin = RulePlanJoins.createJoinNode();
                    parentJoin.addFirstChild(root);
                    parentJoin.addGroups(root.getGroups());
                    root = parentJoin;
                }
                root.addLastChild(joinSourceRoot);
                root.addGroups(entry.getKey().getGroups());
View Full Code Here

Examples of org.teiid.query.optimizer.relational.plantree.PlanNode.addFirstChild()

            critNode.removeProperty(NodeConstants.Info.IS_COPIED);
            critNode.removeProperty(NodeConstants.Info.EST_CARDINALITY);
        }

        if (isLeftChild) {
            parent.addFirstChild(root);
        } else {
            parent.addLastChild(root);
        }
        this.joinRoot = root;
    }
View Full Code Here

Examples of org.teiid.query.optimizer.relational.plantree.PlanNode.addFirstChild()

      PlanNode joinNode = getExamplePlan();
      PlanNode projectNode = NodeFactory.getNewNode(NodeConstants.Types.PROJECT);
      ElementSymbol e1 = new ElementSymbol("e1"); //$NON-NLS-1$
      e1.setGroupSymbol(getGroup(3));
      projectNode.setProperty(Info.PROJECT_COLS, Arrays.asList(e1));
      projectNode.addFirstChild(joinNode);
      projectNode.addGroup(getGroup(3));
      PlanNode sourceNode = NodeFactory.getNewNode(NodeConstants.Types.SOURCE);
      sourceNode.addFirstChild(projectNode);
      GroupSymbol four = getGroup(4);
      sourceNode.addGroup(four);
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.