Examples of changes()


Examples of org.apache.pig.impl.plan.ProjectionMap.changes()

        assertTrue(loadbProjectionMap.changes() == false);

        //check cogroup projection map
        LOCogroup cogroup = (LOCogroup)lp.getSuccessors(loada).get(0);
        ProjectionMap cogroupProjectionMap = cogroup.getProjectionMap();
        assertTrue(cogroupProjectionMap.changes() == true);
       
        MultiMap<Integer, ProjectionMap.Column> cogroupMapFields = cogroupProjectionMap.getMappedFields();
        assertTrue(cogroupMapFields != null);
       
        List<ProjectionMap.Column> mapValues = (ArrayList<ProjectionMap.Column>)cogroupMapFields.get(0);
View Full Code Here

Examples of org.apache.pig.impl.plan.ProjectionMap.changes()

        assertTrue(cogroupAddedFields.get(1) == 2);
       
        //check that the foreach projection map has null mappedFields
        LOForEach foreach = (LOForEach)lp.getLeaves().get(0);
        ProjectionMap foreachProjectionMap = foreach.getProjectionMap();
        assertTrue(foreachProjectionMap.changes() == true);
        assertTrue(foreachProjectionMap.getMappedFields() == null);

        //check that removed fields has all the columns from the input cogroup
        List<Pair<Integer, Integer>> foreachRemovedFields = foreachProjectionMap.getRemovedFields();
        assertTrue(foreachProjectionMap.getRemovedFields().size() == 3);
View Full Code Here

Examples of org.apache.pig.impl.plan.ProjectionMap.changes()

        LogicalPlan lp = planTester.buildPlan(query);
       
        //check that the loads' projection map is null
        LOLoad loada = (LOLoad) lp.getRoots().get(0);
        ProjectionMap loadaProjectionMap = loada.getProjectionMap();
        assertTrue(loadaProjectionMap.changes() == false);
       
        //check cogroup projection map
        LOCogroup cogroup = (LOCogroup)lp.getSuccessors(loada).get(0);
        ProjectionMap cogroupProjectionMap = cogroup.getProjectionMap();
        assertTrue(cogroupProjectionMap.changes() == true);
View Full Code Here

Examples of org.apache.pig.impl.plan.ProjectionMap.changes()

        assertTrue(loadaProjectionMap.changes() == false);
       
        //check cogroup projection map
        LOCogroup cogroup = (LOCogroup)lp.getSuccessors(loada).get(0);
        ProjectionMap cogroupProjectionMap = cogroup.getProjectionMap();
        assertTrue(cogroupProjectionMap.changes() == true);
       
        MultiMap<Integer, ProjectionMap.Column> cogroupMapFields = cogroupProjectionMap.getMappedFields();
        assertTrue(cogroupMapFields == null);
       
        //check the cogroup removed fields is null
View Full Code Here

Examples of org.apache.pig.impl.plan.ProjectionMap.changes()

        assertTrue(cogroupAddedFields.get(1) == 1);
       
        //check that the foreach projection map has non-null mappedFields
        LOForEach foreach = (LOForEach)lp.getLeaves().get(0);
        ProjectionMap foreachProjectionMap = foreach.getProjectionMap();
        assertTrue(foreachProjectionMap.changes() == true);
        MultiMap<Integer, ProjectionMap.Column> foreachMappedFields = foreachProjectionMap.getMappedFields();
        assertTrue(foreachMappedFields != null);
       
        List<ProjectionMap.Column> mapValues = (ArrayList<ProjectionMap.Column>)foreachMappedFields.get(0);
        assertTrue(mapValues.get(0).getInputColumn().first == 0);
View Full Code Here

Examples of org.apache.pig.impl.plan.ProjectionMap.changes()

       
        //check that the order by projection map is not null
        LOSort sort = (LOSort)lp.getSuccessors(load).get(0);
        ProjectionMap sortProjectionMap = sort.getProjectionMap();
        assertTrue(sortProjectionMap != null);
        assertTrue(sortProjectionMap.changes() == false);
       
        //check that the limit projection map is not null
        LOLimit limit = (LOLimit)lp.getLeaves().get(0);
        ProjectionMap limitProjectionMap = limit.getProjectionMap();
        assertTrue(limitProjectionMap != null);
View Full Code Here

Examples of org.apache.pig.impl.plan.ProjectionMap.changes()

       
        //check that the limit projection map is not null
        LOLimit limit = (LOLimit)lp.getLeaves().get(0);
        ProjectionMap limitProjectionMap = limit.getProjectionMap();
        assertTrue(limitProjectionMap != null);
        assertTrue(limitProjectionMap.changes() == false);
    }
   
    @Test
    public void testQueryDistinctWithSchema() {
        planTester.buildPlan("a = load 'a' as (url,hitCount);");
View Full Code Here

Examples of org.apache.pig.impl.plan.ProjectionMap.changes()

        LogicalPlan lp = planTester.buildPlan("b = distinct a;");
       
        //check that the load projection map is null
        LOLoad load = (LOLoad) lp.getRoots().get(0);
        ProjectionMap loadProjectionMap = load.getProjectionMap();
        assertTrue(loadProjectionMap.changes() == false);
       
        //check that the distinct projection map is not null
        LODistinct distinct = (LODistinct)lp.getLeaves().get(0);
        ProjectionMap distinctProjectionMap = distinct.getProjectionMap();
        assertTrue(distinctProjectionMap != null);
View Full Code Here

Examples of org.apache.pig.impl.plan.ProjectionMap.changes()

       
        //check that the distinct projection map is not null
        LODistinct distinct = (LODistinct)lp.getLeaves().get(0);
        ProjectionMap distinctProjectionMap = distinct.getProjectionMap();
        assertTrue(distinctProjectionMap != null);
        assertTrue(distinctProjectionMap.changes() == false);
    }

    @Test
    public void testQueryStreamingWithSchema() {
        String query = "stream (load 'a') through `" + simpleEchoStreamingCommand + "` as (x, y);";
View Full Code Here

Examples of org.apache.pig.impl.plan.ProjectionMap.changes()

        LogicalPlan lp = planTester.buildPlan(query);
       
        //check that the load projection map is null
        LOLoad load = (LOLoad) lp.getRoots().get(0);
        ProjectionMap loadProjectionMap = load.getProjectionMap();
        assertTrue(loadProjectionMap.changes() == false);
       
        //check that the stream projection map is null
        LOStream stream = (LOStream)lp.getLeaves().get(0);
        ProjectionMap streamProjectionMap = stream.getProjectionMap();
        assertTrue(streamProjectionMap.changes() == true);
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.