Examples of PlanWalker


Examples of org.apache.pig.experimental.plan.PlanWalker

    public void visitLOForEach(LOForEach foreach) throws IOException {
        currentOp = foreach;
        // We have an Inner OperatorPlan in ForEach, so we go ahead
        // and work on that plan
        OperatorPlan innerPlan = foreach.getInnerPlan();
        PlanWalker newWalker = currentWalker.spawnChildWalker(innerPlan);
        pushWalker(newWalker);
        currentWalker.walk(this);
        popWalker();
    }
View Full Code Here

Examples of org.apache.pig.experimental.plan.PlanWalker

    public void visitLOForEach(LOForEach op) throws IOException {
        printLevel();
        stream.println( op.toString() );
        level++;
        OperatorPlan innerPlan = op.getInnerPlan();
        PlanWalker newWalker = currentWalker.spawnChildWalker(innerPlan);
        pushWalker(newWalker);
        currentWalker.walk(this);
        popWalker();
        level--;
    }
View Full Code Here

Examples of org.apache.pig.experimental.plan.PlanWalker

        currentPlan = new PhysicalPlan();

//        PlanWalker childWalker = currentWalker
//                .spawnChildWalker(filter.getFilterPlan());
        PlanWalker childWalker = new ReverseDependencyOrderWalker(filter.getFilterPlan());
        pushWalker(childWalker);
        //currentWalker.walk(this);
        currentWalker.walk(
                new ExpToPhyTranslationVisitor( currentWalker.getPlan(),
                        childWalker, filter, currentPlan, logToPhyMap ) );
View Full Code Here

Examples of org.apache.pig.experimental.plan.PlanWalker

        // The physical plan should contain the expression plan for this predecessor plus
        // the subtree starting with this predecessor
        for (int i=0; i<exps.size(); i++) {
            currentPlan = new PhysicalPlan();
            // translate the expression plan
            PlanWalker childWalker = new ReverseDependencyOrderWalker(exps.get(i));
            pushWalker(childWalker);
            childWalker.walk(new ExpToPhyTranslationVisitor(exps.get(i),
                    childWalker, gen, currentPlan, logToPhyMap ));           
            popWalker();
           
            List<Operator> leaves = exps.get(i).getSinks();
            for(Operator l: leaves) {
                PhysicalOperator op = logToPhyMap.get(l);
                if (l instanceof ProjectExpression ) {
                    int input = ((ProjectExpression)l).getInputNum();                   
                   
                    // for each sink projection, get its input logical plan and translate it
                    Operator pred = preds.get(input);
                    childWalker = new SubtreeDependencyOrderWalker(inner, pred);
                    pushWalker(childWalker);
                    childWalker.walk(this);
                    popWalker();
                   
                    // get the physical operator of the leaf of input logical plan
                    PhysicalOperator leaf = logToPhyMap.get(pred);                   
                   
View Full Code Here

Examples of org.apache.pig.experimental.plan.PlanWalker

        for( LogicalExpressionPlan lp : plans ) {
            currentPlan = new PhysicalPlan();
           
            // We spawn a new Dependency Walker and use it
            // PlanWalker childWalker = currentWalker.spawnChildWalker(lp);
            PlanWalker childWalker = new ReverseDependencyOrderWalker(lp);
           
            // Save the old walker and use childWalker as current Walker
            pushWalker(childWalker);
           
            // We create a new ExpToPhyTranslationVisitor to walk the ExpressionPlan
View Full Code Here

Examples of org.apache.pig.experimental.plan.PlanWalker

        currentPlan = new PhysicalPlan();

//        PlanWalker childWalker = currentWalker
//                .spawnChildWalker(filter.getFilterPlan());
        PlanWalker childWalker = new ReverseDependencyOrderWalker(loSplitOutput.getFilterPlan());
        pushWalker(childWalker);
        //currentWalker.walk(this);
        currentWalker.walk(
                new ExpToPhyTranslationVisitor( currentWalker.getPlan(),
                        childWalker, loSplitOutput, currentPlan, logToPhyMap ) );
View Full Code Here

Examples of org.apache.pig.impl.plan.PlanWalker

            for(LogicalPlan lp: mapJoinPlans.get(op)) {
                if (null != lp) {
                    // TODO FIX - How do we know this should be a
                    // DependencyOrderWalker?  We should be replicating the
                    // walker the current visitor is using.
                    PlanWalker w = new DependencyOrderWalker(lp);
                    pushWalker(w);
                    w.walk(this);
                    popWalker();
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.pig.impl.plan.PlanWalker

            for(LogicalPlan lp: mapGByPlans.get(op)) {
                if (null != lp) {
                    // TODO FIX - How do we know this should be a
                    // DependencyOrderWalker?  We should be replicating the
                    // walker the current visitor is using.
                    PlanWalker w = new DependencyOrderWalker(lp);
                    pushWalker(w);
                    for(LogicalOperator logicalOp: lp.getRoots()) {
                        logicalOp.visit(this);
                    }
                    popWalker();
View Full Code Here

Examples of org.apache.pig.impl.plan.PlanWalker

     * @throws VisitorException
     */
    protected void visit(LOForEach g) throws VisitorException {
        // Visit each of generates projection elements.
        for(LogicalPlan lp: g.getForEachPlans()) {
            PlanWalker w = new DependencyOrderWalker(lp);
            pushWalker(w);
            for(LogicalOperator logicalOp: lp.getRoots()) {
                logicalOp.visit(this);
            }
            popWalker();
View Full Code Here

Examples of org.apache.pig.impl.plan.PlanWalker

     * @throws VisitorException
     */
    protected void visit(LOSort s) throws VisitorException {
        // Visit the sort function
        for(LogicalPlan lp: s.getSortColPlans()) {
            PlanWalker w = new DependencyOrderWalker(lp);
            pushWalker(w);
            for(LogicalOperator logicalOp: lp.getRoots()) {
                logicalOp.visit(this);
            }
            popWalker();
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.