private void verifyInt64TimestampValue(String tsString, LogicalTypeAnnotation.TimeUnit timeUnit, boolean legal) {
    Timestamp ts = truncateTimestampString(tsString, timeUnit);
    String truncatedTsString = ts.toString();
    Long int64Value = ParquetTimestampUtils.getInt64(ts, timeUnit);
    if (legal) {
      Timestamp tsFetched = ParquetTimestampUtils.getTimestamp(int64Value, timeUnit, false);
      Assert.assertEquals(truncatedTsString, tsFetched.toString());
    } else {
      Assert.assertEquals(null, int64Value);
    }
  }
Timestamps 1 nanosecond out of nano range should return null.
ql/src/test/org/apache/hadoop/hive/ql/io/parquet/serde/TestParquetTimestampUtils.java