@Test
public void testDecimalScalarMultiplyDecimalColumn() {
VectorizedRowBatch b = getVectorizedRowBatch3DecimalCols();
Decimal128 d = new Decimal128(2);
VectorExpression expr = new DecimalScalarMultiplyDecimalColumn(d, 0, 2);
// test without nulls
expr.evaluate(b);
DecimalColumnVector r = (DecimalColumnVector) b.cols[2];
assertTrue(r.vector[0].equals(new Decimal128("2.40", (short) 2)));
assertTrue(r.vector[1].equals(new Decimal128("-6.60", (short) 2)));
assertTrue(r.vector[2].equals(new Decimal128("0", (short) 2)));
// test that overflow produces null
b = getVectorizedRowBatch3DecimalCols();
DecimalColumnVector in = (DecimalColumnVector) b.cols[0];
in.vector[0].update("9999999999999999.99", (short) 2); // set to max possible value
expr.evaluate(b);
r = (DecimalColumnVector) b.cols[2];
assertFalse(r.noNulls);
assertTrue(r.isNull[0]);
}