Package org.apache.pig.experimental.logical.relational

Examples of org.apache.pig.experimental.logical.relational.LogicalPlan.connect()


        flatten[1] = false;
       
        LOGenerate generate = new LOGenerate(innerPlan, expPlans, flatten);       
        innerPlan.add(generate);
        innerPlan.connect(innerLoad, generate);
        innerPlan.connect(innerLoad2, generate);
       
        foreach.setInnerPlan(innerPlan);
        foreach.setAlias("B");
        plan.add(foreach);
       
View Full Code Here


                       
                        // add foreach to the base plan                      
                        p.add(foreach);
                                      
                        Pair<Integer,Integer> disconnectedPos = p.disconnect(load, next);
                        p.connect(load, disconnectedPos.first.intValue(), foreach, 0 );
                        p.connect(foreach, 0, next, disconnectedPos.second.intValue());
                       
                        // add foreach to the subplan
                        subPlan.add(foreach);
                       
View Full Code Here

                        // add foreach to the base plan                      
                        p.add(foreach);
                                      
                        Pair<Integer,Integer> disconnectedPos = p.disconnect(load, next);
                        p.connect(load, disconnectedPos.first.intValue(), foreach, 0 );
                        p.connect(foreach, 0, next, disconnectedPos.second.intValue());
                       
                        // add foreach to the subplan
                        subPlan.add(foreach);
                       
                        LogicalPlan innerPlan = new LogicalPlan();
View Full Code Here

                        for (int i=0; i<requiredFields.getFields().size(); i++) {
                            LoadPushDown.RequiredField rf = requiredFields.getFields().get(i);
                            LOInnerLoad innerLoad = new LOInnerLoad(innerPlan, foreach, rf.getIndex());
                            innerLoad.getProjection().setUid(foreach);                   
                            innerPlan.add(innerLoad);         
                            innerPlan.connect(innerLoad, gen);
                           
                            LogicalExpressionPlan exp = new LogicalExpressionPlan();
                            ProjectExpression prj = new ProjectExpression(exp, rf.getType(), i, 0);
                            prj.setUid(gen);
                            exp.add(prj);
View Full Code Here

        LogicalRelationalOperator foreach = new LOForEach(plan);
        LogicalRelationalOperator filter = new LOFilter(plan);
       
        plan.add(foreach);
        plan.add(filter);
        plan.connect(foreach, filter);

        return plan;
    }

    @Override
View Full Code Here

            List<Operator> next = p.getSuccessors(op);          
            if (next != null) {
                Operator[] nextArray = next.toArray(new Operator[0]);
                for(Operator n: nextArray) {                 
                    Pair<Integer, Integer> pos = p.disconnect(op, n);          
                    p.connect(foreach, pos.first, n, pos.second);
                }
            }
           
            p.connect(op, foreach);                       
           
View Full Code Here

                    Pair<Integer, Integer> pos = p.disconnect(op, n);          
                    p.connect(foreach, pos.first, n, pos.second);
                }
            }
           
            p.connect(op, foreach);                       
           
            LogicalPlan innerPlan = new LogicalPlan();
            foreach.setInnerPlan(innerPlan);
                     
            // get output columns
View Full Code Here

                }
                              
                LOInnerLoad innerLoad = new LOInnerLoad(innerPlan, foreach, i);
                innerLoad.getProjection().setUid(foreach);                   
                innerPlan.add(innerLoad);         
                innerPlan.connect(innerLoad, gen);
               
                LogicalExpressionPlan exp = new LogicalExpressionPlan();
                ProjectExpression prj = new ProjectExpression(exp, schema.getField(i).type, j++, 0);
                prj.setUid(gen);
                exp.add(prj);
View Full Code Here

        LogicalPlan plan = new LogicalPlan();
        LogicalRelationalOperator op1 = new LOJoin(plan);
        LogicalRelationalOperator op2 = new LOFilter(plan);
        plan.add(op1);
        plan.add(op2);
        plan.connect(op1, op2);
       
        return plan;
    }
}
View Full Code Here

          mm.put(0, aprojplan);
          mm.put(1, bprojplan);
          LOJoin C = new LOJoin(lp, mm, JOINTYPE.HASH, new boolean[] {true, true});
          C.neverUseForRealSetSchema(cschema);
          lp.add(C);
          lp.connect(A, C);
          lp.connect(B, C);
       
          // D = filter
          LogicalExpressionPlan filterPlan = new LogicalExpressionPlan();
          ProjectExpression fx = new ProjectExpression(filterPlan, DataType.INTEGER, 0, 0);
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.