use of org.teiid.query.optimizer.relational.plantree.PlanNode in project teiid by teiid.
the class TestRuleAssignOutputElements method testFindNoAllUnion2.
@Test
public void testFindNoAllUnion2() {
PlanNode unionNode = NodeFactory.getNewNode(NodeConstants.Types.SET_OP);
unionNode.setProperty(NodeConstants.Info.SET_OPERATION, Operation.UNION);
unionNode.setProperty(NodeConstants.Info.USE_ALL, Boolean.TRUE);
PlanNode projNode1 = NodeFactory.getNewNode(NodeConstants.Types.PROJECT);
PlanNode accessNode1 = NodeFactory.getNewNode(NodeConstants.Types.ACCESS);
PlanNode projNode2 = NodeFactory.getNewNode(NodeConstants.Types.PROJECT);
PlanNode accessNode2 = NodeFactory.getNewNode(NodeConstants.Types.ACCESS);
unionNode.addLastChild(projNode1);
projNode1.addLastChild(accessNode1);
unionNode.addLastChild(projNode2);
projNode2.addLastChild(accessNode2);
helpTestIsUnionNoAll(unionNode, false);
}
use of org.teiid.query.optimizer.relational.plantree.PlanNode in project teiid by teiid.
the class TestRuleAssignOutputElements method testFindNoAllUnion4.
@Test
public void testFindNoAllUnion4() {
PlanNode unionNode1 = NodeFactory.getNewNode(NodeConstants.Types.SET_OP);
unionNode1.setProperty(NodeConstants.Info.SET_OPERATION, Operation.UNION);
unionNode1.setProperty(NodeConstants.Info.USE_ALL, Boolean.TRUE);
PlanNode unionNode2 = NodeFactory.getNewNode(NodeConstants.Types.SET_OP);
unionNode2.setProperty(NodeConstants.Info.SET_OPERATION, Operation.UNION);
unionNode2.setProperty(NodeConstants.Info.USE_ALL, Boolean.FALSE);
PlanNode projNode1 = NodeFactory.getNewNode(NodeConstants.Types.PROJECT);
PlanNode accessNode1 = NodeFactory.getNewNode(NodeConstants.Types.ACCESS);
PlanNode projNode2 = NodeFactory.getNewNode(NodeConstants.Types.PROJECT);
PlanNode accessNode2 = NodeFactory.getNewNode(NodeConstants.Types.ACCESS);
PlanNode projNode3 = NodeFactory.getNewNode(NodeConstants.Types.PROJECT);
PlanNode accessNode3 = NodeFactory.getNewNode(NodeConstants.Types.ACCESS);
unionNode1.addLastChild(projNode1);
projNode1.addLastChild(accessNode1);
unionNode1.addLastChild(unionNode2);
unionNode2.addLastChild(projNode2);
projNode2.addLastChild(accessNode2);
unionNode2.addLastChild(projNode3);
projNode3.addLastChild(accessNode3);
helpTestIsUnionNoAll(unionNode1, true);
}
use of org.teiid.query.optimizer.relational.plantree.PlanNode in project teiid by teiid.
the class TestRuleChooseDependent method testValidJoin3.
@Test
public void testValidJoin3() throws Exception {
PlanNode accessNode1 = NodeFactory.getNewNode(NodeConstants.Types.ACCESS);
PlanNode accessNode2 = NodeFactory.getNewNode(NodeConstants.Types.ACCESS);
accessNode1.addGroup(getPhysicalGroup(1));
accessNode2.addGroup(getPhysicalGroup(2));
PlanNode joinNode = NodeFactory.getNewNode(NodeConstants.Types.JOIN);
joinNode.setProperty(NodeConstants.Info.JOIN_TYPE, JoinType.JOIN_RIGHT_OUTER);
List crits = new ArrayList();
crits.add(new CompareCriteria(getElementSymbol(1, 1), CompareCriteria.EQ, getElementSymbol(2, 1)));
joinNode.setProperty(NodeConstants.Info.JOIN_CRITERIA, crits);
joinNode.addLastChild(accessNode1);
joinNode.addLastChild(accessNode2);
helpTestValidJoin(joinNode, accessNode1, true);
}
use of org.teiid.query.optimizer.relational.plantree.PlanNode in project teiid by teiid.
the class TestRuleChooseDependent method testValidJoin5.
@Test
public void testValidJoin5() throws Exception {
PlanNode accessNode1 = NodeFactory.getNewNode(NodeConstants.Types.ACCESS);
PlanNode accessNode2 = NodeFactory.getNewNode(NodeConstants.Types.ACCESS);
PlanNode joinNode = NodeFactory.getNewNode(NodeConstants.Types.JOIN);
joinNode.setProperty(NodeConstants.Info.JOIN_TYPE, JoinType.JOIN_LEFT_OUTER);
List crits = new ArrayList();
crits.add(new CompareCriteria(getElementSymbol(1, 1), CompareCriteria.EQ, getElementSymbol(2, 1)));
joinNode.setProperty(NodeConstants.Info.JOIN_CRITERIA, crits);
joinNode.addLastChild(accessNode1);
joinNode.addLastChild(accessNode2);
helpTestValidJoin(joinNode, accessNode1, false);
}
use of org.teiid.query.optimizer.relational.plantree.PlanNode in project teiid by teiid.
the class TestRuleChooseDependent method testValidJoin6.
@Test
public void testValidJoin6() throws Exception {
PlanNode accessNode1 = NodeFactory.getNewNode(NodeConstants.Types.ACCESS);
PlanNode accessNode2 = NodeFactory.getNewNode(NodeConstants.Types.ACCESS);
accessNode1.addGroup(getPhysicalGroup(1));
accessNode2.addGroup(getPhysicalGroup(2));
PlanNode joinNode = NodeFactory.getNewNode(NodeConstants.Types.JOIN);
joinNode.setProperty(NodeConstants.Info.JOIN_TYPE, JoinType.JOIN_LEFT_OUTER);
List crits = new ArrayList();
crits.add(new CompareCriteria(getElementSymbol(1, 1), CompareCriteria.EQ, getElementSymbol(2, 1)));
joinNode.setProperty(NodeConstants.Info.JOIN_CRITERIA, crits);
joinNode.addLastChild(accessNode1);
joinNode.addLastChild(accessNode2);
helpTestValidJoin(joinNode, accessNode2, true);
}
Aggregations