Package org.apache.pig.impl.logicalLayer

Examples of org.apache.pig.impl.logicalLayer.ExpressionOperator


       
        exprOpsMap.put(colOp, op);
    }

    public void visit(LOAnd binOp) throws VisitorException {
        ExpressionOperator left = binOp.getLhsOperand();
        ExpressionOperator right = binOp.getRhsOperand();
               
        AndExpression ae = new AndExpression(exprPlan, exprOpsMap.get(left), exprOpsMap.get(right));
        exprOpsMap.put(binOp, ae);           
    }
View Full Code Here


        AndExpression ae = new AndExpression(exprPlan, exprOpsMap.get(left), exprOpsMap.get(right));
        exprOpsMap.put(binOp, ae);           
    }

    public void visit(LOOr binOp) throws VisitorException {
        ExpressionOperator left = binOp.getLhsOperand();
        ExpressionOperator right = binOp.getRhsOperand();
               
        OrExpression ae = new OrExpression(exprPlan, exprOpsMap.get(left), exprOpsMap.get(right));
        exprOpsMap.put(binOp, ae);
    }
View Full Code Here

        OrExpression ae = new OrExpression(exprPlan, exprOpsMap.get(left), exprOpsMap.get(right));
        exprOpsMap.put(binOp, ae);
    }

    public void visit(LONot uniOp) throws VisitorException {
        ExpressionOperator exp = uniOp.getOperand();
        NotExpression not = new NotExpression(exprPlan, exprOpsMap.get(exp));
        exprOpsMap.put(uniOp, not);
    }
View Full Code Here

        NotExpression not = new NotExpression(exprPlan, exprOpsMap.get(exp));
        exprOpsMap.put(uniOp, not);
    }

    public void visit(LOIsNull uniOp) throws VisitorException {
        ExpressionOperator exp = uniOp.getOperand();
        IsNullExpression isNull = new IsNullExpression(exprPlan, exprOpsMap.get(exp));
        exprOpsMap.put(uniOp, isNull);
    }
View Full Code Here

    }

    void GenerateMatchingTupleHelper(Tuple t, LOAnd op, boolean invert)
            throws ExecException {
        ExpressionOperator input = op.getLhsOperand();
        GenerateMatchingTupleHelper(t, input, invert);
        input = op.getRhsOperand();
        GenerateMatchingTupleHelper(t, input, invert);

    }
View Full Code Here

    }

    void GenerateMatchingTupleHelper(Tuple t, LOOr op, boolean invert)
            throws ExecException {
        ExpressionOperator input = op.getLhsOperand();
        GenerateMatchingTupleHelper(t, input, invert);
        input = op.getRhsOperand();
        GenerateMatchingTupleHelper(t, input, invert);

    }
View Full Code Here

    }

    void GenerateMatchingTupleHelper(Tuple t, LONot op, boolean invert)
            throws ExecException {
        ExpressionOperator input = op.getOperand();
        GenerateMatchingTupleHelper(t, input, !invert);

    }
View Full Code Here

    }

    @Override
    public void visit(LOMod binOp) throws VisitorException {
        ExpressionOperator lhs = binOp.getLhsOperand() ;
        ExpressionOperator rhs = binOp.getRhsOperand() ;

        byte lhsType = lhs.getType() ;
        byte rhsType = rhs.getType() ;

        if ( (lhsType == DataType.INTEGER) &&
             (rhsType == DataType.INTEGER)
           ) {
           //do nothing
View Full Code Here

        if (leaves.size() > 1) {
            int errCode = 2060;
            String msg = "Expected one leaf. Found " + leaves.size() + " leaves.";
            throw new TypeCheckerException(msg, errCode, PigException.BUG);
        }
        ExpressionOperator currentOutput = (ExpressionOperator) leaves.get(0);
        collectCastWarning(frj, currentOutput.getType(), toType);
        OperatorKey newKey = genNewOperatorKey(currentOutput);
        LOCast cast = new LOCast(innerPlan, newKey, toType);
        innerPlan.add(cast);
        try {
            innerPlan.connect(currentOutput, cast);
View Full Code Here

        if (leaves.size() > 1) {
            int errCode = 2060;
            String msg = "Expected one leaf. Found " + leaves.size() + " leaves.";
            throw new TypeCheckerException(msg, errCode, PigException.BUG);
        }
        ExpressionOperator currentOutput = (ExpressionOperator) leaves.get(0) ;
        collectCastWarning(cg, currentOutput.getType(), toType) ;
        OperatorKey newKey = genNewOperatorKey(currentOutput) ;
        LOCast cast = new LOCast(innerPlan, newKey, toType) ;
        innerPlan.add(cast) ;
        try {
            innerPlan.connect(currentOutput, cast) ;
View Full Code Here

TOP

Related Classes of org.apache.pig.impl.logicalLayer.ExpressionOperator

Copyright © 2018 www.massapicom. 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.