Package org.apache.pig.test.TestLogicalOptimizer

Examples of org.apache.pig.test.TestLogicalOptimizer.LogicalOptimizerDerivative.optimize()


    public void testOpLimitOptimizerCheck() throws Exception {
        planTester.buildPlan("A = load 'myfile';");
        planTester.buildPlan("B = foreach A generate $0;");
        org.apache.pig.impl.logicalLayer.LogicalPlan plan = planTester.buildPlan("C = limit B 100;");
        LogicalOptimizerDerivative optimizer = new LogicalOptimizerDerivative(plan);
        int numIterations = optimizer.optimize();
        Assert.assertFalse("Checking number of iterations of the optimizer [actual = "
                + numIterations + ", expected < " + optimizer.getMaxIterations() +
                "]", optimizer.getMaxIterations() == numIterations);
   
    }
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.