boolean isValidTimestamp(Object fieldValue) {
      // only check if int64 time unit is nanos
      if (useInt64 && timeUnit == LogicalTypeAnnotation.TimeUnit.NANOS) {
        Timestamp ts = inspector.getPrimitiveJavaObject(fieldValue);
        return ParquetTimestampUtils.getInt64(ts, timeUnit) != null;
      }
      return true;
    }
Checks that an inspector matches the category indicated as a parameter.
@param inspector The object inspector to check
@param category The category to match
@throws IllegalArgumentException if inspector does not match the category
ql/src/java/org/apache/hadoop/hive/ql/io/parquet/write/DataWritableWriter.java