code: private ObjectInspector getObjectInspectorForType(TypeInfo type)
              throws SerDeException {
          switch (type.getCategory()) {
              case PRIMITIVE:
                  PrimitiveTypeInfo primitiveType = (PrimitiveTypeInfo) type;
                  if (isSupportedPrimitive(primitiveType)) {
                      return PrimitiveObjectInspectorFactory.getPrimitiveJavaObjectInspector(primitiveType.getPrimitiveCategory());
                  }
                  break;
              case STRUCT:
                  StructTypeInfo structType = (StructTypeInfo) type;
                  List<ObjectInspector> structInspectors = Lists.newArrayListWithCapacity(structType.getAllStructFieldTypeInfos().size());
                  for (TypeInfo fieldType : structType.getAllStructFieldTypeInfos()) {
                      structInspectors.add(getObjectInspectorForType(fieldType));
                  }
                  return ObjectInspectorFactory.getStandardStructObjectInspector(structType.getAllStructFieldNames(), structInspectors);
              case MAP:
                  MapTypeInfo mapType = (MapTypeInfo) type;
                  return ObjectInspectorFactory.getStandardMapObjectInspector(
                          getObjectInspectorForType(mapType.getMapKeyTypeInfo()), getObjectInspectorForType(mapType.getMapValueTypeInfo()));
              case LIST:
                  ListTypeInfo listType = (ListTypeInfo) type;
                  return ObjectInspectorFactory.getStandardListObjectInspector(getObjectInspectorForType(listType.getListElementTypeInfo()));
              case UNION:
                  UnionTypeInfo unionType = (UnionTypeInfo) type;
                  List<ObjectInspector> unionInspectors = Lists.newArrayListWithCapacity(unionType.getAllUnionObjectTypeInfos().size());
                  for (TypeInfo fieldType : unionType.getAllUnionObjectTypeInfos()) {
                      unionInspectors.add(getObjectInspectorForType(fieldType));
                  }
                  return ObjectInspectorFactory.getStandardUnionObjectInspector(unionInspectors);
          }
  
          // Should be unreachable
          throw new SerDeException("Unsupported type: " + type);
      }
docs: Returns the associated ObjectInspector for a type.  This most delegates the to Hive java implementations but filters
  out primitives not supported by EmoDB.