Examples of buildPlan()


Examples of org.apache.pig.test.utils.LogicalPlanTester.buildPlan()

   
    @Test
    public void testMultipleFilter2() throws Exception {
        LogicalPlanTester lpt = new LogicalPlanTester( pc );
        lpt.buildPlan( "A = LOAD 'file.txt' AS (name, age, cuisines : bag{ t : ( cuisine ) } );" );
        lpt.buildPlan( "B = FOREACH A GENERATE name, age, flatten(cuisines);" );
        lpt.buildPlan( "C = FILTER B BY name == 'joe';" );
        lpt.buildPlan( "D = FILTER C BY age == 30;" );
        org.apache.pig.impl.logicalLayer.LogicalPlan plan = lpt.buildPlan( "E = STORE D INTO 'empty';" )
        LogicalPlan newLogicalPlan = migrateAndOptimizePlan( plan );
       
View Full Code Here

Examples of org.apache.pig.test.utils.LogicalPlanTester.buildPlan()

    @Test
    public void testMultipleFilter2() throws Exception {
        LogicalPlanTester lpt = new LogicalPlanTester( pc );
        lpt.buildPlan( "A = LOAD 'file.txt' AS (name, age, cuisines : bag{ t : ( cuisine ) } );" );
        lpt.buildPlan( "B = FOREACH A GENERATE name, age, flatten(cuisines);" );
        lpt.buildPlan( "C = FILTER B BY name == 'joe';" );
        lpt.buildPlan( "D = FILTER C BY age == 30;" );
        org.apache.pig.impl.logicalLayer.LogicalPlan plan = lpt.buildPlan( "E = STORE D INTO 'empty';" )
        LogicalPlan newLogicalPlan = migrateAndOptimizePlan( plan );
       
        Operator load = newLogicalPlan.getSources().get( 0 );
View Full Code Here

Examples of org.apache.pig.test.utils.LogicalPlanTester.buildPlan()

    public void testMultipleFilter2() throws Exception {
        LogicalPlanTester lpt = new LogicalPlanTester( pc );
        lpt.buildPlan( "A = LOAD 'file.txt' AS (name, age, cuisines : bag{ t : ( cuisine ) } );" );
        lpt.buildPlan( "B = FOREACH A GENERATE name, age, flatten(cuisines);" );
        lpt.buildPlan( "C = FILTER B BY name == 'joe';" );
        lpt.buildPlan( "D = FILTER C BY age == 30;" );
        org.apache.pig.impl.logicalLayer.LogicalPlan plan = lpt.buildPlan( "E = STORE D INTO 'empty';" )
        LogicalPlan newLogicalPlan = migrateAndOptimizePlan( plan );
       
        Operator load = newLogicalPlan.getSources().get( 0 );
        Assert.assertTrue( load instanceof LOLoad );
View Full Code Here

Examples of org.apache.pig.test.utils.LogicalPlanTester.buildPlan()

        LogicalPlanTester lpt = new LogicalPlanTester( pc );
        lpt.buildPlan( "A = LOAD 'file.txt' AS (name, age, cuisines : bag{ t : ( cuisine ) } );" );
        lpt.buildPlan( "B = FOREACH A GENERATE name, age, flatten(cuisines);" );
        lpt.buildPlan( "C = FILTER B BY name == 'joe';" );
        lpt.buildPlan( "D = FILTER C BY age == 30;" );
        org.apache.pig.impl.logicalLayer.LogicalPlan plan = lpt.buildPlan( "E = STORE D INTO 'empty';" )
        LogicalPlan newLogicalPlan = migrateAndOptimizePlan( plan );
       
        Operator load = newLogicalPlan.getSources().get( 0 );
        Assert.assertTrue( load instanceof LOLoad );
        Operator filter = newLogicalPlan.getSuccessors( load ).get( 0 );
View Full Code Here

Examples of org.apache.pig.test.utils.LogicalPlanTester.buildPlan()

    }
   
    @Test
    public void testMultipleFilterNotPossible() throws Exception {
        LogicalPlanTester lpt = new LogicalPlanTester( pc );
        lpt.buildPlan( "A = LOAD 'file.txt' AS (name, cuisines : bag{ t : ( cuisine, region ) } );" );
        lpt.buildPlan( "B = FOREACH A GENERATE name, flatten(cuisines);" );
        lpt.buildPlan( "C = FILTER B BY $1 == 'French';" );
        lpt.buildPlan( "D = FILTER C BY $2 == 'Europe';" );
        org.apache.pig.impl.logicalLayer.LogicalPlan plan = lpt.buildPlan( "E = STORE D INTO 'empty';" )
        LogicalPlan newLogicalPlan = migrateAndOptimizePlan( plan );
View Full Code Here

Examples of org.apache.pig.test.utils.LogicalPlanTester.buildPlan()

   
    @Test
    public void testMultipleFilterNotPossible() throws Exception {
        LogicalPlanTester lpt = new LogicalPlanTester( pc );
        lpt.buildPlan( "A = LOAD 'file.txt' AS (name, cuisines : bag{ t : ( cuisine, region ) } );" );
        lpt.buildPlan( "B = FOREACH A GENERATE name, flatten(cuisines);" );
        lpt.buildPlan( "C = FILTER B BY $1 == 'French';" );
        lpt.buildPlan( "D = FILTER C BY $2 == 'Europe';" );
        org.apache.pig.impl.logicalLayer.LogicalPlan plan = lpt.buildPlan( "E = STORE D INTO 'empty';" )
        LogicalPlan newLogicalPlan = migrateAndOptimizePlan( plan );
View Full Code Here

Examples of org.apache.pig.test.utils.LogicalPlanTester.buildPlan()

    @Test
    public void testMultipleFilterNotPossible() throws Exception {
        LogicalPlanTester lpt = new LogicalPlanTester( pc );
        lpt.buildPlan( "A = LOAD 'file.txt' AS (name, cuisines : bag{ t : ( cuisine, region ) } );" );
        lpt.buildPlan( "B = FOREACH A GENERATE name, flatten(cuisines);" );
        lpt.buildPlan( "C = FILTER B BY $1 == 'French';" );
        lpt.buildPlan( "D = FILTER C BY $2 == 'Europe';" );
        org.apache.pig.impl.logicalLayer.LogicalPlan plan = lpt.buildPlan( "E = STORE D INTO 'empty';" )
        LogicalPlan newLogicalPlan = migrateAndOptimizePlan( plan );

        Operator load = newLogicalPlan.getSources().get( 0 );
View Full Code Here

Examples of org.apache.pig.test.utils.LogicalPlanTester.buildPlan()

    public void testMultipleFilterNotPossible() throws Exception {
        LogicalPlanTester lpt = new LogicalPlanTester( pc );
        lpt.buildPlan( "A = LOAD 'file.txt' AS (name, cuisines : bag{ t : ( cuisine, region ) } );" );
        lpt.buildPlan( "B = FOREACH A GENERATE name, flatten(cuisines);" );
        lpt.buildPlan( "C = FILTER B BY $1 == 'French';" );
        lpt.buildPlan( "D = FILTER C BY $2 == 'Europe';" );
        org.apache.pig.impl.logicalLayer.LogicalPlan plan = lpt.buildPlan( "E = STORE D INTO 'empty';" )
        LogicalPlan newLogicalPlan = migrateAndOptimizePlan( plan );

        Operator load = newLogicalPlan.getSources().get( 0 );
        Assert.assertTrue( load instanceof LOLoad );
View Full Code Here

Examples of org.apache.pig.test.utils.LogicalPlanTester.buildPlan()

        LogicalPlanTester lpt = new LogicalPlanTester( pc );
        lpt.buildPlan( "A = LOAD 'file.txt' AS (name, cuisines : bag{ t : ( cuisine, region ) } );" );
        lpt.buildPlan( "B = FOREACH A GENERATE name, flatten(cuisines);" );
        lpt.buildPlan( "C = FILTER B BY $1 == 'French';" );
        lpt.buildPlan( "D = FILTER C BY $2 == 'Europe';" );
        org.apache.pig.impl.logicalLayer.LogicalPlan plan = lpt.buildPlan( "E = STORE D INTO 'empty';" )
        LogicalPlan newLogicalPlan = migrateAndOptimizePlan( plan );

        Operator load = newLogicalPlan.getSources().get( 0 );
        Assert.assertTrue( load instanceof LOLoad );
        Operator fe1 = newLogicalPlan.getSuccessors( load ).get( 0 );
View Full Code Here

Examples of org.apache.pig.test.utils.LogicalPlanTester.buildPlan()

    }
   
    @Test
    public void testNotPossibleFilter() throws Exception {
        LogicalPlanTester lpt = new LogicalPlanTester( pc );
        lpt.buildPlan( "A = LOAD 'file.txt' AS (name, cuisines:bag{ t : ( cuisine ) } );" );
        lpt.buildPlan( "B = FOREACH A GENERATE name, flatten(cuisines);" );
        lpt.buildPlan( "C = FILTER B BY cuisine == 'French';" );
        org.apache.pig.impl.logicalLayer.LogicalPlan plan = lpt.buildPlan( "D = STORE C INTO 'empty';" )
        LogicalPlan newLogicalPlan = migrateAndOptimizePlan( plan );
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.