Package org.apache.pig.data

Examples of org.apache.pig.data.DataAtom.longVal()


        EvalFunc<DataAtom> count = new COUNT.Final();
        DataAtom output = new DataAtom();
        count.exec(tup, output);

        assertEquals("Expected count to be 100", 100, output.longVal());
    }

    @Test
    public void testSUM() throws Exception {
        int input[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
View Full Code Here


                + "'using org.apache.pig.test.RangeSlicer()) all) generate COUNT($1);";
        pigServer.registerQuery(query);
        Iterator<Tuple> it = pigServer.openIterator("vals");
        Tuple cur = it.next();
        DataAtom val = cur.getAtomField(0);
        assertEquals(numvals, (int) val.longVal());
    }
}
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.