@Override
  public Object getStructFieldData(final Object data, final StructField fieldRef) {
    if (data == null) {
      return null;
    }
    if (data instanceof ArrayWritable) {
      final ArrayWritable arr = (ArrayWritable) data;
      final StructFieldImpl structField = (StructFieldImpl) fieldRef;
      int index = isRoot ? structField.getIndex() : structField.adjustedIndex;
      if (index < arr.get().length) {
        return arr.get()[index];
      } else {
        return null;
      }
    }

    //since setStructFieldData and create return a list, getStructFieldData should be able to
    //handle list data. This is required when table serde is ParquetHiveSerDe and partition serde
    //is something else.
    if (data instanceof List) {
      return ((List) data).get(((StructFieldImpl) fieldRef).getIndex());
    }

    throw new UnsupportedOperationException("Cannot inspect " + data.getClass().getCanonicalName());
  }
The ArrayWritableObjectInspector will inspect an ArrayWritable, considering it as a Hive struct.<br>
It can also inspect a List if Hive decides to inspect the result of an inspection.
ql/src/java/org/apache/hadoop/hive/ql/io/parquet/serde/ArrayWritableObjectInspector.java