Package org.apache.pig.piggybank.evaluation.decode

Examples of org.apache.pig.piggybank.evaluation.decode.Bin


        t3.set(4, new Double(1.80));
        t3.set(5, "L");
        t3.set(6, new Double(1.90));
        t4.set(7, "XL");

        Bin func = new Bin();
        String r = func.exec(t1);
        assertTrue(r.equals("young"));
       
        r = func.exec(t2);
        assertTrue(r.equals("M"));
       
        r = func.exec(t3);
        assertTrue(r==null);
       
        try {
            r = func.exec(t4);
            fail("Exception not triggered");
        } catch (IOException e) {
            assertTrue(e.getMessage().equals("Bin : Encounter null in the input"));
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.pig.piggybank.evaluation.decode.Bin

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.