@Test
  public void testCastStringToTimestampWithFormat() throws HiveException {
    VectorizedRowBatch b =
        TestVectorMathFunctions.getVectorizedRowBatchStringInTimestampOutFormatted();
    TimestampColumnVector resultV;
    resultV = new TimestampColumnVector();
    b.cols[1] = resultV;
    VectorExpression expr =
        new CastStringToTimestampWithFormat(0, "yyyy.mm.dd HH24.mi.ss.ff".getBytes(), 1);
    expr.evaluate(b);

    verifyTimestamp("2019-12-31 00:00:00.999999999", resultV, 0);
    verifyTimestamp("1776-07-04 17:07:06.177617761", resultV, 1);
    verifyTimestamp("2012-02-29 23:59:59.999999999", resultV, 2);
    verifyTimestamp("1580-08-08 00:00:00", resultV, 3);
    verifyTimestamp("0005-01-01 00:00:00", resultV, 4);
    verifyTimestamp("9999-12-31 23:59:59.999999999", resultV, 5);
  }
Tests vectorized type cast udfs CastDateToStringWithFormat, CastTimestampToStringWithFormat,
CastStringToDateWithFormat, CastStringToTimestampWithFormat.
ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorTypeCastsWithFormat.java