private void compareToUDFDatetimeLegacyHybridCalendar(
      GenericUDF udf, java.sql.Timestamp in, java.sql.Timestamp out) throws HiveException {
    TimestampWritableV2 tswInput = new TimestampWritableV2(
        org.apache.hadoop.hive.common.type.Timestamp.ofEpochMilli(in.getTime(), in.getNanos()));
    TimestampWritableV2 tswOutput = (TimestampWritableV2) udf
        .evaluate(new GenericUDF.DeferredObject[] {new GenericUDF.DeferredJavaObject(tswInput)});
    Assert.assertEquals(tswOutput.getTimestamp(), Timestamp.ofEpochMilli(out.getTime()));
    Assert.assertEquals(tswOutput.getNanos(), out.getNanos());
  }
Input array is used to fill the entire specified size of the vector row batch.
ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorUDFDatetimeLegacyHybridCalendar.java