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