Package org.apache.pig.newplan.logical.expression

Examples of org.apache.pig.newplan.logical.expression.NegativeExpression


    }

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


       
        assertEquals( 1, genExp.getSources().size() );
       
        // Main Tests start here
        assertEquals( NegativeExpression.class, genExp.getSources().get(0).getClass() );
        NegativeExpression add = (NegativeExpression) genExp.getSources().get(0);
        assertEquals( ls.getField(0).uid, add.getExpression().getFieldSchema().uid );
        assertTrue( ls.getField(0).uid != add.getFieldSchema().uid );
        assertTrue( ls.getField(1).uid != add.getFieldSchema().uid );
       
        assertEquals( 1, inputPln.getLeaves().size() );
        assertEquals( PONegative.class, inputPln.getLeaves().get(0).getClass() );
        PONegative pNegative = (PONegative) inputPln.getLeaves().get(0);
        assertEquals( 1, inputPln.getRoots().size() );
View Full Code Here

       
        assertEquals( 1, genExp.getSources().size() );
       
        // Main Tests start here
        assertEquals( NegativeExpression.class, genExp.getSources().get(0).getClass() );
        NegativeExpression add = (NegativeExpression) genExp.getSources().get(0);
        assertEquals( ls.getField(0).uid, add.getExpression().getFieldSchema().uid );
        assertTrue( ls.getField(0).uid != add.getFieldSchema().uid );
        assertTrue( ls.getField(1).uid != add.getFieldSchema().uid );
       
        assertEquals( 1, inputPln.getLeaves().size() );
        assertEquals( PONegative.class, inputPln.getLeaves().get(0).getClass() );
        PONegative pNegative = (PONegative) inputPln.getLeaves().get(0);
        assertEquals( 1, inputPln.getRoots().size() );
View Full Code Here

    public void testArithmeticOpCastInsert2() throws Throwable {
        LogicalExpressionPlan plan = new LogicalExpressionPlan();
        ConstantExpression constant1 = new ConstantExpression(plan, 10);
        ConstantExpression constant2 =  new ConstantExpression(plan, 20L);

        NegativeExpression neg1 = new NegativeExpression(plan, constant1);
        SubtractExpression subtract1 = new SubtractExpression(plan, neg1, constant2);

        // Before type checking its set correctly = PIG-421
        // assertEquals(DataType.LONG, subtract1.getType());
View Full Code Here

    public void testArithmeticOpCastInsert2() throws Throwable {
        LogicalExpressionPlan plan = new LogicalExpressionPlan() ;
        ConstantExpression constant1 = new ConstantExpression(plan, 10) ;
        ConstantExpression constant2 =  new ConstantExpression(plan, 20L) ;

        NegativeExpression neg1 = new NegativeExpression(plan, constant1) ;
        SubtractExpression subtract1 = new SubtractExpression(plan, neg1, constant2) ;

        // Before type checking its set correctly = PIG-421
//        assertEquals(DataType.LONG, subtract1.getType()) ;
View Full Code Here

    public void testArithmeticOpCastInsert2() throws Throwable {
        LogicalExpressionPlan plan = new LogicalExpressionPlan();
        ConstantExpression constant1 = new ConstantExpression(plan, 10);
        ConstantExpression constant2 =  new ConstantExpression(plan, 20L);

        NegativeExpression neg1 = new NegativeExpression(plan, constant1);
        SubtractExpression subtract1 = new SubtractExpression(plan, neg1, constant2);

        // Before type checking its set correctly = PIG-421
        // assertEquals(DataType.LONG, subtract1.getType());
View Full Code Here

    public void testArithmeticOpCastInsert2() throws Throwable {
        LogicalExpressionPlan plan = new LogicalExpressionPlan();
        ConstantExpression constant1 = new ConstantExpression(plan, 10);
        ConstantExpression constant2 =  new ConstantExpression(plan, 20L);

        NegativeExpression neg1 = new NegativeExpression(plan, constant1);
        SubtractExpression subtract1 = new SubtractExpression(plan, neg1, constant2);

        // Before type checking its set correctly = PIG-421
        // assertEquals(DataType.LONG, subtract1.getType());
View Full Code Here

    public void testArithmeticOpCastInsert2() throws Throwable {
        LogicalExpressionPlan plan = new LogicalExpressionPlan() ;
        ConstantExpression constant1 = new ConstantExpression(plan, 10) ;
        ConstantExpression constant2 =  new ConstantExpression(plan, 20L) ;

        NegativeExpression neg1 = new NegativeExpression(plan, constant1) ;
        SubtractExpression subtract1 = new SubtractExpression(plan, neg1, constant2) ;

        // Before type checking its set correctly = PIG-421
//        assertEquals(DataType.LONG, subtract1.getType()) ;
View Full Code Here

       
        assertEquals( 1, genExp.getSources().size() );
       
        // Main Tests start here
        assertEquals( NegativeExpression.class, genExp.getSources().get(0).getClass() );
        NegativeExpression add = (NegativeExpression) genExp.getSources().get(0);
        assertEquals( ls.getField(0).uid, add.getExpression().getFieldSchema().uid );
        assertTrue( ls.getField(0).uid != add.getFieldSchema().uid );
        assertTrue( ls.getField(1).uid != add.getFieldSchema().uid );
       
        assertEquals( 1, inputPln.getLeaves().size() );
        assertEquals( PONegative.class, inputPln.getLeaves().get(0).getClass() );
        PONegative pNegative = (PONegative) inputPln.getLeaves().get(0);
        assertEquals( 1, inputPln.getRoots().size() );
View Full Code Here

    public void testArithmeticOpCastInsert2() throws Throwable {
        LogicalExpressionPlan plan = new LogicalExpressionPlan() ;
        ConstantExpression constant1 = new ConstantExpression(plan, 10) ;
        ConstantExpression constant2 =  new ConstantExpression(plan, 20L) ;

        NegativeExpression neg1 = new NegativeExpression(plan, constant1) ;
        SubtractExpression subtract1 = new SubtractExpression(plan, neg1, constant2) ;

        // Before type checking its set correctly = PIG-421
//        assertEquals(DataType.LONG, subtract1.getType()) ;
View Full Code Here

TOP

Related Classes of org.apache.pig.newplan.logical.expression.NegativeExpression

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.