Search in sources :

Example 26 with Estimate

use of com.yahoo.sketches.pig.theta.Estimate in project sketches-pig by DataSketches.

the class EstimateTest method testNullEmpty.

@Test
public void testNullEmpty() throws IOException {
    EvalFunc<Double> func = new Estimate();
    Tuple inputTuple = null;
    Double returnValue = func.exec(inputTuple);
    assertNull(returnValue);
    inputTuple = TupleFactory.getInstance().newTuple(0);
    returnValue = func.exec(inputTuple);
    assertNull(returnValue);
}
Also used : Estimate(com.yahoo.sketches.pig.theta.Estimate) Tuple(org.apache.pig.data.Tuple) Test(org.testng.annotations.Test)

Aggregations

Estimate (com.yahoo.sketches.pig.theta.Estimate)26 Tuple (org.apache.pig.data.Tuple)26 Test (org.testng.annotations.Test)26 DataBag (org.apache.pig.data.DataBag)19 DataByteArray (org.apache.pig.data.DataByteArray)7 Union (com.yahoo.sketches.pig.theta.Union)5 Intersect (com.yahoo.sketches.pig.theta.Intersect)4 AexcludeB (com.yahoo.sketches.pig.theta.AexcludeB)1