Package org.apache.pig.backend.hadoop.executionengine.physicalLayer.plans

Examples of org.apache.pig.backend.hadoop.executionengine.physicalLayer.plans.PatternPlan.match()


        PhysicalPlan pplan = new PhysicalPlan();
        POForEach fe = new POForEach(getNewOpKey());
        pplan.add(fe);

        // verify that match is false
        boolean matched = ptPlan.match(pplan);
        assertFalse("plan not matched", matched);

       
        //add a filter to the plan (fe -> fil)
        POFilter fil = new POFilter(getNewOpKey());
View Full Code Here


        POFilter fil = new POFilter(getNewOpKey());
        pplan.add(fil);
        pplan.connect(fe, fil);
       
        //verify that pattern matches
        matched = ptPlan.match(pplan);
        assertTrue("plan matched", matched);
        assertEquals(" class matched ", ptFilNode.getMatch(), fil);
       
        //test leaf/source settings in pattern node
        ptFilNode.setSourceNode(true);
View Full Code Here

        assertTrue("plan matched", matched);
        assertEquals(" class matched ", ptFilNode.getMatch(), fil);
       
        //test leaf/source settings in pattern node
        ptFilNode.setSourceNode(true);
        assertFalse("plan matched", ptPlan.match(pplan));
       
        ptFilNode.setSourceNode(false);
        ptFilNode.setLeafNode(true);
        assertTrue("plan matched", ptPlan.match(pplan));
       
View Full Code Here

        ptFilNode.setSourceNode(true);
        assertFalse("plan matched", ptPlan.match(pplan));
       
        ptFilNode.setSourceNode(false);
        ptFilNode.setLeafNode(true);
        assertTrue("plan matched", ptPlan.match(pplan));
       
       
       
    }
View Full Code Here

        PhysicalPlan pplan = new PhysicalPlan();
        POFilter fil = new POFilter(getNewOpKey());
        pplan.add(fil);

        // verify that match is false
        assertFalse("plan not matched", ptPlan.match(pplan));
       
        //verify that there is no match in the pattern nodes
        assertEquals("null match", ptFilNode.getMatch(), null);
        assertEquals("null match", ptFENode.getMatch(), null);
View Full Code Here

        POForEach fe = new POForEach(getNewOpKey());
        pplan.add(fe);
        pplan.connect(fe, fil);

        // verify that match is true
        assertTrue("plan matched", ptPlan.match(pplan));

        // set leaf and source properties and try again
        ptFilNode.setLeafNode(true);
        ptFENode.setSourceNode(true);
        assertTrue("plan matched", ptPlan.match(pplan));       
View Full Code Here

        assertTrue("plan matched", ptPlan.match(pplan));

        // set leaf and source properties and try again
        ptFilNode.setLeafNode(true);
        ptFENode.setSourceNode(true);
        assertTrue("plan matched", ptPlan.match(pplan));       
       
        //add a store to the plan to make it (fe -> fil -> store)
        POStore store = new POStore(getNewOpKey());
        pplan.add(store);
        pplan.connect(fil, store);
View Full Code Here

        POStore store = new POStore(getNewOpKey());
        pplan.add(store);
        pplan.connect(fil, store);
       
        // match should fail because filter pt node leaf property is set
        assertFalse("plan matched", ptPlan.match(pplan));
        //reset patter filter node leaf property
        ptFilNode.setLeafNode(false);
       
       
        // verify that match is true
View Full Code Here

        //reset patter filter node leaf property
        ptFilNode.setLeafNode(false);
       
       
        // verify that match is true
        assertTrue("plan matched", ptPlan.match(pplan));
        assertEquals("filter pt node match", ptFilNode.getMatch(), fil);
        assertEquals("foreach pt node match", ptFENode.getMatch(), fe);
              
       
        //add a store to the plan to make it (fe -> fe -> fil -> store)
View Full Code Here

        POForEach fe2 = new POForEach(getNewOpKey());
        pplan.add(fe2);
        pplan.connect(fe2, fe);
       
        // match fails because fe pattern node is set to be source
        assertFalse("plan matched", ptPlan.match(pplan));
        ptFENode.setSourceNode(false);
       
        // verify that match is true
        assertTrue("plan matched", ptPlan.match(pplan));
        assertEquals("filter pt node match", ptFilNode.getMatch(), fil);
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.