@Test
  public void testTimestampAfter1900() throws Exception {

    //9999-01-01
    BytesWritable in = new BytesWritable(BaseEncoding.base16().lowerCase().decode("0095cfd304"));

    List<Object> row = (List<Object>) serde.deserialize(in);
    Date ts = ((DateWritableV2) row.get(0)).get();
    Assert.assertEquals(ts.getYear(), 9999);
    Assert.assertEquals(ts.getMonth(), 1);
    Assert.assertEquals(ts.getDay(), 1);

    BytesWritable res = (BytesWritable) serde.serialize(row, serde.getObjectInspector());
    Assert.assertTrue(Arrays.equals(in.copyBytes(), res.copyBytes()));
  }
Test the data type DATE for Teradata binary format.
serde/src/test/org/apache/hadoop/hive/serde2/teradata/TestTeradataBinarySerdeForDate.java