private void checkInspectorCategory(ObjectInspector inspector, ObjectInspector.Category category) {
    if (!inspector.getCategory().equals(category)) {
      throw new IllegalArgumentException("Invalid data type: expected " + category
          + " type, but found: " + inspector.getCategory());
    }
  }
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