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

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


        // 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);
        assertEquals("foreach pt node match", ptFENode.getMatch(), fe);
       
        //create new plan (fil -> fe)
        PhysicalPlan pplan2 = new PhysicalPlan();
View Full Code Here


        POForEach fe21 = new POForEach(getNewOpKey());
        pplan.add(fe21);
        pplan.connect(fil2, fe21);

        //verify that plan does not match
        assertFalse("plan not matched", ptPlan.match(pplan2));
        assertEquals("null match", ptFilNode.getMatch(), null);
        assertEquals("null match", ptFENode.getMatch(), null);    
       
    }
   
View Full Code Here

       
        //create plan fil -> fil -> fe -> store
        PhysicalPlan pplan = new PhysicalPlan();
        POFilter fil = new POFilter(getNewOpKey());
        pplan.add(fil);
        assertFalse("plan not matched", ptPlan.match(pplan));
        assertEquals("null match", ptFilNode.getMatch(), null);
        assertEquals("null match", ptFENode.getMatch(), null);
        assertEquals("null match", ptStNode.getMatch(), null);
       
        POForEach fe = new POForEach(getNewOpKey());
View Full Code Here

        assertEquals("null match", ptStNode.getMatch(), null);
       
        POForEach fe = new POForEach(getNewOpKey());
        pplan.add(fe);
        pplan.connect(fil, fe);
        assertFalse("plan not matched", ptPlan.match(pplan));
       
        POFilter fil2 = new POFilter(getNewOpKey());
        pplan.add(fil2);
        pplan.connect(fil2, fil);
        assertFalse("plan not matched", ptPlan.match(pplan));
View Full Code Here

        assertFalse("plan not matched", ptPlan.match(pplan));
       
        POFilter fil2 = new POFilter(getNewOpKey());
        pplan.add(fil2);
        pplan.connect(fil2, fil);
        assertFalse("plan not matched", ptPlan.match(pplan));
       
        POStore store = new POStore(getNewOpKey());
        pplan.add(store);
        pplan.connect(fe, store);
        assertTrue("plan matched", ptPlan.match(pplan));
View Full Code Here

        assertFalse("plan not matched", ptPlan.match(pplan));
       
        POStore store = new POStore(getNewOpKey());
        pplan.add(store);
        pplan.connect(fe, store);
        assertTrue("plan matched", ptPlan.match(pplan));
       
        assertEquals("test match node", ptFilNode.getMatch(), fil);
        assertEquals("test match node", ptFENode.getMatch(), fe);
        assertEquals("test match node", ptStNode.getMatch(), store);
       
View Full Code Here

       
        //create plan
        PhysicalPlan pplan = new PhysicalPlan();
        POFilter fil = new POFilter(getNewOpKey());
        pplan.add(fil);
        assertFalse("plan not matched", ptPlan.match(pplan));
       
        POForEach fe = new POForEach(getNewOpKey());
        pplan.add(fe);
        assertFalse("plan not matched", ptPlan.match(pplan));
       
View Full Code Here

        pplan.add(fil);
        assertFalse("plan not matched", ptPlan.match(pplan));
       
        POForEach fe = new POForEach(getNewOpKey());
        pplan.add(fe);
        assertFalse("plan not matched", ptPlan.match(pplan));
       
        POFRJoin join = new POFRJoin(getNewOpKey(), 0, null,
                new ArrayList<List<PhysicalPlan>>(), null, null, 0, false,null);
        pplan.add(join);
        pplan.connect(fil, join);
View Full Code Here

        POFRJoin join = new POFRJoin(getNewOpKey(), 0, null,
                new ArrayList<List<PhysicalPlan>>(), null, null, 0, false,null);
        pplan.add(join);
        pplan.connect(fil, join);
        pplan.connect(fe, join);
        assertTrue("plan matched", ptPlan.match(pplan));
        assertEquals("test match node", ptFilNode.getMatch(), fil);
        assertEquals("test match node", ptFENode.getMatch(), fe);
        assertEquals("test match node", ptJoinNode.getMatch(), join);
       
    }
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.