@Test
public void testIfExprStringScalarStringColumn() {
VectorizedRowBatch batch = getBatch1Long3BytesVectors();
byte[] scalar = getUTF8Bytes("scalar");
VectorExpression expr = new IfExprStringScalarStringGroupColumn(0,scalar, 2, 3);
BytesColumnVector r = (BytesColumnVector) batch.cols[3];
expr.evaluate(batch);
assertTrue(getString(r, 0).equals("arg3_0"));
assertTrue(getString(r, 1).equals("arg3_1"));
assertTrue(getString(r, 2).equals("scalar"));
assertTrue(getString(r, 3).equals("scalar"));
assertTrue(r.noNulls);
// test for null input strings
batch = getBatch1Long3BytesVectors();
BytesColumnVector arg3 = (BytesColumnVector) batch.cols[2];
arg3.noNulls = false;
arg3.isNull[1] = true;
arg3.vector[1] = null;
expr.evaluate(batch);
r = (BytesColumnVector) batch.cols[3];
assertTrue(!r.noNulls && r.isNull[1]);
}