private Timestamp truncateTimestampString(String tsString, LogicalTypeAnnotation.TimeUnit timeUnit) {
    Timestamp ts = Timestamp.valueOf(tsString);
    switch (timeUnit) {
    case MILLIS:
      ts.setNanos(ts.getNanos() / 1_000_000 * 1_000_000);
      break;
    case MICROS:
      ts.setNanos(ts.getNanos() / 1_000 * 1_000);
      break;
    default:
      break;
    }
    return ts;
  }
Timestamps 1 nanosecond out of nano range should return null.
ql/src/test/org/apache/hadoop/hive/ql/io/parquet/serde/TestParquetTimestampUtils.java