Package org.apache.pig.piggybank.evaluation.stats

Examples of org.apache.pig.piggybank.evaluation.stats.COV.exec()


    dBag1.add(tup1);
    Tuple input = new Tuple(2);
    input.setField(0, dBag);
    input.setField(1, dBag1);
    DataBag output = new DefaultDataBag();
    COV.exec(input, output);
    Iterator<Tuple> it = output.iterator();
    Tuple ans = (Tuple) it.next();
    assertEquals(ans.getAtomField(0).toString(),"a");
    assertEquals(ans.getAtomField(1).toString(),"b");
    assertEquals(1.11111, ans.getAtomField(2).numval(),0.0005);
View Full Code Here


    tup1.set(0, 4.0);
    dBag1.add(tup1);
    Tuple input = DefaultTupleFactory.getInstance().newTuple(2);
    input.set(0, dBag);
    input.set(1, dBag1);
    DataBag output = cov.exec(input);
    Iterator<Tuple> it = output.iterator();
    Tuple ans = (Tuple)it.next();
    assertEquals((String)ans.get(0),"a");
    assertEquals((String)ans.get(1),"b");
    assertEquals(1.11111, (Double)ans.get(2),0.0005);
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.