@Override
    public void write(Object value) {
      Timestamp ts = inspector.getPrimitiveJavaObject(value);
      if (useInt64) {
        Long int64value = ParquetTimestampUtils.getInt64(ts, timeUnit);
        recordConsumer.addLong(int64value);
      } else {
        recordConsumer.addBinary(
            NanoTimeUtils.getNanoTime(ts, TimeZone.getDefault().toZoneId(), isLegacyZoneConversion).toBinary());
      }
    }
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