Package org.apache.pig.impl.logicalLayer

Examples of org.apache.pig.impl.logicalLayer.LogicalPlan.connect()


                LOCast cast = new LOCast(genPlan,
                                         genNewOperatorKey(fromOp),
                                         inputFieldType) ;
                genPlan.add(cast) ;
                try {
                    genPlan.connect(project, cast);
                }
                catch (PlanException pe) {
                    // This should never happen
                    int errCode = 2059;
                    String msg = "Problem with inserting cast operator for project in plan.";
View Full Code Here


        LOStore store = new LOStore(plan, genNewOperatorKeyId(), filespec2) ;
       
        plan.add(load) ;
        plan.add(store) ;
       
        plan.connect(load, store) ;    
       
        return plan ;   
    }
   
    private OperatorKey genNewOperatorKeyId() {
View Full Code Here

                            // from the "determinedSchema" is different
                            // from the type specified - so we need to cast
                            LOCast cast = new LOCast(p,
                                        OperatorKey.genOpKey(scope), fs.type);
                            p.add(cast);
                            p.connect(proj, cast);
                           
                            cast.setFieldSchema(fs.clone());
                            FuncSpec loadFuncSpec = null;
                            if(lo instanceof LOLoad) {
                                loadFuncSpec = ((LOLoad)lo).getInputFile().getFuncSpec();
View Full Code Here

        OperatorKey newKey = genNewOperatorKey(rg) ;
        LOCast cast = new LOCast(currentPlan, newKey, rg.getOperand(), DataType.CHARARRAY) ;
        currentPlan.add(cast) ;
        currentPlan.disconnect(rg.getOperand(), rg) ;
        try {
            currentPlan.connect(rg.getOperand(), cast) ;
            currentPlan.connect(cast, rg) ;
        }
        catch (PlanException pe) {
            int errCode = 2059;
            String msg = "Problem with inserting cast operator for regular expression in plan.";
View Full Code Here

        LOCast cast = new LOCast(currentPlan, newKey, rg.getOperand(), DataType.CHARARRAY) ;
        currentPlan.add(cast) ;
        currentPlan.disconnect(rg.getOperand(), rg) ;
        try {
            currentPlan.connect(rg.getOperand(), cast) ;
            currentPlan.connect(cast, rg) ;
        }
        catch (PlanException pe) {
            int errCode = 2059;
            String msg = "Problem with inserting cast operator for regular expression in plan.";
            throw new TypeCheckerException(msg, errCode, PigException.BUG, pe);
View Full Code Here

        OperatorKey newKey = genNewOperatorKey(binOp) ;
        LOCast cast = new LOCast(currentPlan, newKey, binOp.getLhsOperand(), toType) ;
        currentPlan.add(cast) ;
        currentPlan.disconnect(binOp.getLhsOperand(), binOp) ;
        try {
            currentPlan.connect(binOp.getLhsOperand(), cast) ;
            currentPlan.connect(cast, binOp) ;
            binOp.setLhsOperand(cast);
        }
        catch (PlanException pe) {
            int errCode = 2059;
View Full Code Here

        LOCast cast = new LOCast(currentPlan, newKey, binOp.getLhsOperand(), toType) ;
        currentPlan.add(cast) ;
        currentPlan.disconnect(binOp.getLhsOperand(), binOp) ;
        try {
            currentPlan.connect(binOp.getLhsOperand(), cast) ;
            currentPlan.connect(cast, binOp) ;
            binOp.setLhsOperand(cast);
        }
        catch (PlanException pe) {
            int errCode = 2059;
            String msg = "Problem with inserting cast operator for binary conditional in plan.";
View Full Code Here

        OperatorKey newKey = genNewOperatorKey(binOp) ;
        LOCast cast = new LOCast(currentPlan, newKey, binOp.getRhsOperand(), toType) ;
        currentPlan.add(cast) ;
        currentPlan.disconnect(binOp.getRhsOperand(), binOp) ;
        try {
            currentPlan.connect(binOp.getRhsOperand(), cast) ;
            currentPlan.connect(cast, binOp) ;
            binOp.setRhsOperand(cast);
        }
        catch (PlanException pe) {
            int errCode = 2059;
View Full Code Here

        LOCast cast = new LOCast(currentPlan, newKey, binOp.getRhsOperand(), toType) ;
        currentPlan.add(cast) ;
        currentPlan.disconnect(binOp.getRhsOperand(), binOp) ;
        try {
            currentPlan.connect(binOp.getRhsOperand(), cast) ;
            currentPlan.connect(cast, binOp) ;
            binOp.setRhsOperand(cast);
        }
        catch (PlanException pe) {
            int errCode = 2059;
            String msg = "Problem with inserting cast operator for binary conditional in plan.";
View Full Code Here

        LOCast cast = new LOCast(currentPlan, newKey, input, toType) ;
       
        currentPlan.add(cast);
        currentPlan.disconnect(input, uniOp) ;
        try {
            currentPlan.connect(input, cast) ;
            currentPlan.connect(cast, uniOp) ;
        }
        catch (PlanException pe) {
            int errCode = 2059;
            String msg = "Problem with inserting cast operator for unary operator in 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.