Package org.apache.pig.experimental.logical.expression

Examples of org.apache.pig.experimental.logical.expression.BinCondExpression


       
        assertEquals( 1, genExp.getSources().size() );
       
        // Main Tests start here
        assertEquals( BinCondExpression.class, genExp.getSources().get(0).getClass() );
        BinCondExpression add = (BinCondExpression) genExp.getSources().get(0);
        assertEquals( LessThanExpression.class, add.getCondition().getClass() );
        LessThanExpression lessThan = (LessThanExpression) add.getCondition();
        assertEquals( ProjectExpression.class, lessThan.getLhs().getClass() );
        ProjectExpression prj1 = ((ProjectExpression)lessThan.getLhs());
        ProjectExpression prj2 = ((ProjectExpression)lessThan.getRhs());
        assertEquals( ls.getField(0).uid, prj1.getUid() );
        assertEquals( ProjectExpression.class, lessThan.getRhs().getClass() );
        assertEquals( ls.getField(1).uid, prj2.getUid() );
       
        assertEquals( ProjectExpression.class, add.getLhs().getClass() );
        ProjectExpression prj3 = ((ProjectExpression)add.getLhs());
        assertEquals( ls.getField(1).uid, prj3.getUid() );
        assertEquals( ProjectExpression.class, add.getRhs().getClass() );
        ProjectExpression prj4 = ((ProjectExpression)add.getRhs());
        assertEquals( ls.getField(0).uid, prj4.getUid() );
       
       
        assertEquals( 4, inputPln.getRoots().size() );
        for( PhysicalOperator p : inputPln.getRoots() ) {
View Full Code Here


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

TOP

Related Classes of org.apache.pig.experimental.logical.expression.BinCondExpression

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.