@Test
public void testDate() {
for (VectorExpression.Type colType : dateTimestampStringTypes) {
LongColumnVector date = newRandomLongColumnVector(10000, size);
BytesColumnVector output = new BytesColumnVector(size);
VectorizedRowBatch batch = new VectorizedRowBatch(2, size);
batch.cols[0] = castTo(date, colType);
batch.cols[1] = output;
validateDate(batch, colType, date);
TestVectorizedRowBatch.addRandomNulls(date);
batch.cols[0] = castTo(date, colType);
validateDate(batch, colType, date);
}
VectorExpression udf = new VectorUDFDateString(0, 1);
udf.setInputTypes(VectorExpression.Type.STRING);
VectorizedRowBatch batch = new VectorizedRowBatch(2, 1);
batch.cols[0] = new BytesColumnVector(1);
batch.cols[1] = new BytesColumnVector(1);
BytesColumnVector bcv = (BytesColumnVector) batch.cols[0];
byte[] bytes = new byte[0];
try {
bytes = "error".getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
}