@Test(timeout = 300_000)
  public void testMultiThreaded() throws Exception {

    //when java DateTimeFormatter/GregorianCalendar race was not handled, used to throw exceptions like -

    // 1) java.lang.NumberFormatException: For input string: "" OR java.lang.NumberFormatException: For input string: ".821582E.821582E44"

    // 2) Caused by: java.lang.ArrayIndexOutOfBoundsException: -5325980
    //	at sun.util.calendar.BaseCalendar.getCalendarDateFromFixedDate(BaseCalendar.java:453)
    //	at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2397)

    // create 5 threads and start manipulating vectors, should not throw any exceptions now.

    List<Thread> threads = new ArrayList<>();

    threads.add(startVectorManipulationThread(50000, -141428));
    threads.add(startVectorManipulationThread(50000, -141430));
    threads.add(startVectorManipulationThread(50000, -16768));
    threads.add(startVectorManipulationThread(50000, -499952));
    threads.add(startVectorManipulationThread(50000, -499955));

    for (Thread thread : threads) {
      thread.join();
    }

  }
Test case for DateColumnVector's changeCalendar
epoch days, hybrid representation, proleptic representation
  16768: hybrid: 2015-11-29 proleptic: 2015-11-29
-141418: hybrid: 1582-10-24 proleptic: 1582-10-24
-141427: hybrid: 1582-10-15 proleptic: 1582-10-15
-141428: hybrid: 1582-10-04 proleptic: 1582-10-14
-141430: hybrid: 1582-10-02 proleptic: 1582-10-12
-141437: hybrid: 1582-09-25 proleptic: 1582-10-05
-141438: hybrid: 1582-09-24 proleptic: 1582-10-04
-499952: hybrid: 0601-03-04 proleptic: 0601-03-07
-499955: hybrid: 0601-03-01 proleptic: 0601-03-04
@throws Exception
storage-api/src/test/org/apache/hadoop/hive/ql/exec/vector/TestDateColumnVector.java