private byte[] encodeTime(Timestamp timestamp) {
    ByteBuffer encoded;
    long time = timestamp.getTime();
    try {
      String formatted = dateFormat.format(new Date(time));
      encoded = Text.encode(formatted);
    } catch (CharacterCodingException e) {
      throw new RuntimeException(e);
    }
    return Arrays.copyOf(encoded.array(), encoded.limit());
  }
Input array is used to fill the entire size of the vector row batch
ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorTimestampExpressions.java