}
@Test
public void testVectorRound() {
VectorizedRowBatch b = getVectorizedRowBatchDoubleInDoubleOut();
VectorExpression expr = new FuncRoundDoubleToDouble(0, 1);
DoubleColumnVector resultV = (DoubleColumnVector) b.cols[1];
b.cols[0].noNulls = true;
expr.evaluate(b);
Assert.assertEquals(-2d, resultV.vector[0]);
Assert.assertEquals(-1d, resultV.vector[1]);
Assert.assertEquals(0d, resultV.vector[2]);
Assert.assertEquals(0d, resultV.vector[3]);
Assert.assertEquals(1d, resultV.vector[4]);
Assert.assertEquals(1d, resultV.vector[5]);
Assert.assertEquals(2d, resultV.vector[6]);
// spot check null propagation
b.cols[0].noNulls = false;
b.cols[0].isNull[3] = true;
resultV.noNulls = true;
expr.evaluate(b);
Assert.assertEquals(true, resultV.isNull[3]);
Assert.assertEquals(false, resultV.noNulls);
// check isRepeating propagation
b.cols[0].isRepeating = true;
resultV.isRepeating = false;
expr.evaluate(b);
Assert.assertEquals(-2d, resultV.vector[0]);
Assert.assertEquals(true, resultV.isRepeating);
resultV.isRepeating = false;
b.cols[0].noNulls = true;
expr.evaluate(b);
Assert.assertEquals(-2d, resultV.vector[0]);
Assert.assertEquals(true, resultV.isRepeating);
}