@Override
    public void write(Object value) {
      for (int i = 0; i < structFields.size(); i++) {
        StructField field = structFields.get(i);
        Object fieldValue = inspector.getStructFieldData(value, field);
        DataWriter writer = structWriters[i];

        if (fieldValue != null && isValidValue(fieldValue, writer)) {
          String fieldName = field.getFieldName();

          recordConsumer.startField(fieldName, i);
          writer.write(fieldValue);
          recordConsumer.endField(fieldName, i);
        }
      }
    }
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