Examples of ExpressionOperator


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

    @Override
    public void visit(LOOr binOp) throws VisitorException {
        // if lhs or rhs is null constant then cast it to boolean
        insertCastsForNullToBoolean(binOp);
        ExpressionOperator lhs = binOp.getLhsOperand();
        ExpressionOperator rhs = binOp.getRhsOperand();

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

        if (  (lhsType != DataType.BOOLEAN||
              (rhsType != DataType.BOOLEAN)  ) {
            int errCode = 1038;
            String msg = "Operands of AND/OR can be boolean only" ;
View Full Code Here

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

    }

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

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

        if ( DataType.isNumberType(lhsType) &&
             DataType.isNumberType(rhsType) ) {

            // return the bigger type
View Full Code Here

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

        exprOpsMap.put(con, ce);      
        translateConnection(con, ce);
    }
   
    public void visit(LOGreaterThan op) throws VisitorException {
        ExpressionOperator left = op.getLhsOperand();
        ExpressionOperator right = op.getRhsOperand();
               
        GreaterThanExpression eq = new GreaterThanExpression
        (exprPlan, exprOpsMap.get(left), exprOpsMap.get(right));
        exprOpsMap.put(op, eq);
    }
View Full Code Here

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

        (exprPlan, exprOpsMap.get(left), exprOpsMap.get(right));
        exprOpsMap.put(op, eq);
    }

    public void visit(LOLesserThan op) throws VisitorException {
        ExpressionOperator left = op.getLhsOperand();
        ExpressionOperator right = op.getRhsOperand();
               
        LessThanExpression eq = new LessThanExpression
        (exprPlan, exprOpsMap.get(left), exprOpsMap.get(right));
        exprOpsMap.put(op, eq);
    }
View Full Code Here

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

        (exprPlan, exprOpsMap.get(left), exprOpsMap.get(right));
        exprOpsMap.put(op, eq);
    }

    public void visit(LOGreaterThanEqual op) throws VisitorException {
        ExpressionOperator left = op.getLhsOperand();
        ExpressionOperator right = op.getRhsOperand();
               
        GreaterThanEqualExpression eq = new GreaterThanEqualExpression
        (exprPlan, exprOpsMap.get(left), exprOpsMap.get(right));
        exprOpsMap.put(op, eq);
    }
View Full Code Here

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

        (exprPlan, exprOpsMap.get(left), exprOpsMap.get(right));
        exprOpsMap.put(op, eq);
    }

    public void visit(LOLesserThanEqual op) throws VisitorException {
        ExpressionOperator left = op.getLhsOperand();
        ExpressionOperator right = op.getRhsOperand();
               
        LessThanEqualExpression eq = new LessThanEqualExpression
        (exprPlan, exprOpsMap.get(left), exprOpsMap.get(right));
        exprOpsMap.put(op, eq);
    }
View Full Code Here

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

        (exprPlan, exprOpsMap.get(left), exprOpsMap.get(right));
        exprOpsMap.put(op, eq);
    }

    public void visit(LOEqual op) throws VisitorException {    
        ExpressionOperator left = op.getLhsOperand();
        ExpressionOperator right = op.getRhsOperand();
               
        EqualExpression eq = new EqualExpression(exprPlan, exprOpsMap.get(left), exprOpsMap.get(right));
        exprOpsMap.put(op, eq);
    }
View Full Code Here

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

        }

    }

    public void visit(LOBinCond op) throws VisitorException {
        ExpressionOperator condition = op.getCond();
        ExpressionOperator left = op.getLhsOp();
        ExpressionOperator right = op.getRhsOp();
       
        BinCondExpression exp = new BinCondExpression(exprPlan,
                exprOpsMap.get(condition), exprOpsMap.get(left), exprOpsMap.get(right));
        exprOpsMap.put(op, exp);
    }
View Full Code Here

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

                exprOpsMap.get(condition), exprOpsMap.get(left), exprOpsMap.get(right));
        exprOpsMap.put(op, exp);
    }

    public void visit(LOCast cast) throws VisitorException {
        ExpressionOperator exp = cast.getExpression();
       
        CastExpression c = null;
        try {
            c = new CastExpression(exprPlan, exprOpsMap.get(exp), Util.translateFieldSchema(cast.getFieldSchema()));
        } catch (FrontendException e) {
View Full Code Here

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

        c.setFuncSpec(cast.getLoadFuncSpec());
        exprOpsMap.put(cast, c);
    }
   
    public void visit(LORegexp binOp) throws VisitorException {
        ExpressionOperator left = binOp.getLhsOperand();
        ExpressionOperator right = binOp.getRhsOperand();
       
        RegexExpression ae = new RegexExpression(exprPlan
                , exprOpsMap.get(left), exprOpsMap.get(right));
        exprOpsMap.put(binOp, ae);
    }
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.