Examples of LOInnerLoad


Examples of org.apache.pig.experimental.logical.relational.LOInnerLoad

           
            if (op == oldLogicalPlan.getPredecessors(oldForeach).get(0)) {
                // if this projection is to get a field from outer plan, change it
                // to LOInnerLoad
               
                LOInnerLoad innerLoad = new LOInnerLoad(newInnerPlan, foreach, project.isStar()?-1:project.getCol());   
               
                newInnerPlan.add(innerLoad);               
                innerOpsMap.put(project, innerLoad);               
           
           
View Full Code Here

Examples of org.apache.pig.newplan.logical.relational.LOInnerLoad

                LOGenerate gen = new LOGenerate(innerPlan, exps, new boolean[requiredFields.getFields().size()]);
                innerPlan.add(gen);
               
                for (int i=0; i<requiredFields.getFields().size(); i++) {
                    LoadPushDown.RequiredField rf = requiredFields.getFields().get(i);
                    LOInnerLoad innerLoad = new LOInnerLoad(innerPlan, foreach, rf.getIndex());                   
                    innerPlan.add(innerLoad);         
                    innerPlan.connect(innerLoad, gen);
                   
                    LogicalExpressionPlan exp = new LogicalExpressionPlan();
                    ProjectExpression prj = new ProjectExpression(exp, i, -1, gen);
View Full Code Here

Examples of org.apache.pig.newplan.logical.relational.LOInnerLoad

                }
            }
            for (int i = 0; i < s.size(); i++) {
                LogicalSchema.LogicalFieldSchema fs = s.getField(i);
               
                LOInnerLoad innerLoad = new LOInnerLoad(innerPlan, foreach, i);
                innerPlan.add(innerLoad);         
                innerPlan.connect(innerLoad, gen);
               
                LogicalExpressionPlan exp = new LogicalExpressionPlan();
               
View Full Code Here

Examples of org.apache.pig.newplan.logical.relational.LOInnerLoad

            boolean duplicateInputs = false;
            for (Operator op : foreach2.getInnerPlan().getSources()) {
                // If the source is not LOInnerLoad, then it must be LOGenerate. This happens when
                // the 1st ForEach does not rely on any input of 2nd ForEach
                if (op instanceof LOInnerLoad) {
                    LOInnerLoad innerLoad = (LOInnerLoad)op;
                    int input = innerLoad.getProjection().getColNum();
                    if (inputs.contains(input)) {
                        duplicateInputs = true;
                        break;
                    }
                    else
                        inputs.add(input);
                   
                    if (innerLoad.getProjection().isProjectStar())
                        return false;
                }
            }
           
            // Duplicate inputs in the case first foreach only containing LOInnerLoad and
View Full Code Here

Examples of org.apache.pig.newplan.logical.relational.LOInnerLoad

        // If op is LOInnerLoad, get a copy of it, otherwise, return op itself
        private Operator getOperatorToMerge(Operator op, OperatorPlan newPlan, LOForEach newForEach) {
            Operator opToMerge = op;
            if (op instanceof LOInnerLoad) {
                opToMerge = new LOInnerLoad(newPlan, newForEach, ((LOInnerLoad)op).getColNum());
            } else {
                opToMerge.setPlan(newPlan);
            }
            return opToMerge;
        }
View Full Code Here

Examples of org.apache.pig.newplan.logical.relational.LOInnerLoad

                exp2Sinks.addAll(newExpPlan.getSinks());
                for (Operator exp2Sink : exp2Sinks) {
                    if (exp2Sink instanceof ProjectExpression) {
                        // Find referred expression plan in 1st ForEach
                        ProjectExpression proj = (ProjectExpression)exp2Sink;
                        LOInnerLoad innerLoad = (LOInnerLoad)foreach2.getInnerPlan().getPredecessors(gen2).get(proj.getInputNum());
                        int exp1Pos = innerLoad.getProjection().getColNum();
                        LogicalExpressionPlan exp1 = gen1.getOutputPlans().get(exp1Pos);
                        LogicalExpressionPlan exp1Copy = exp1.deepCopy();
                        List<Operator> exp1Sources = newExpPlan.merge(exp1Copy);
                       
                        // Copy expression plan to the new ForEach, connect to the expression plan of 2nd ForEach
View Full Code Here

Examples of org.apache.pig.newplan.logical.relational.LOInnerLoad

                for( int i = 0; i < fieldCount; i++ ) {
                    LogicalExpressionPlan expr = new LogicalExpressionPlan();
                    expr.add( new ProjectExpression( expr, i, -1, gen ) );
                    exprs.add( expr );
                   
                    LOInnerLoad innerLoad = new LOInnerLoad(innerPlan, newForeach, i);
                    innerPlan.add(innerLoad);
                    innerPlan.connect(innerLoad, gen);
                }
               
                newForeach.setAlias(((LogicalRelationalOperator)next).getAlias());
View Full Code Here

Examples of org.apache.pig.newplan.logical.relational.LOInnerLoad

        for (int i=0, j=0; i<schema.size(); i++) {
            if (columnsToDrop.contains(i)) {
                continue;
            }
           
            LOInnerLoad innerLoad = new LOInnerLoad(innerPlan, foreach, i);
            innerPlan.add(innerLoad);
            innerPlan.connect(innerLoad, gen);
           
            LogicalExpressionPlan exp = new LogicalExpressionPlan();
            ProjectExpression prj = new ProjectExpression(exp, j++, -1, gen);
View Full Code Here

Examples of org.apache.pig.newplan.logical.relational.LOInnerLoad

       
        if (op == outerPlan.getPredecessors(oldForeach).get(0)) {
            // if this projection is to get a field from outer plan, change it
            // to LOInnerLoad
           
            LOInnerLoad innerLoad = new LOInnerLoad(newInnerPlan,
                    (org.apache.pig.newplan.logical.relational.LOForEach)attachedRelationalOp,
                    project.isStar()?-1:project.getCol());
           
            newInnerPlan.add(innerLoad);
            innerOpsMap.put(project, innerLoad);
View Full Code Here

Examples of org.apache.pig.newplan.logical.relational.LOInnerLoad

        for (int i=0;i<foreach.getForEachPlans().size();i++) {
            LogicalPlan innerPlan = foreach.getForEachPlans().get(i);
            // Assume only one project is allowed in this level of foreach
            LOProject project = (LOProject)innerPlan.iterator().next();

            LOInnerLoad innerLoad = new LOInnerLoad(newForEachInnerPlan,
                    newForEach, project.isStar()?-1:project.getCol());
            newForEachInnerPlan.add(innerLoad);
            newForEachInnerPlan.connect(innerLoad, generate);
            LogicalExpressionPlan expPlan = new LogicalExpressionPlan();
            expPlans.add(expPlan);
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.