static public ObjectInspector createObjectInspector(TypeInfo info) {
    switch (info.getCategory()) {
      case PRIMITIVE:
        switch (((PrimitiveTypeInfo) info).getPrimitiveCategory()) {
          case FLOAT:
            return PrimitiveObjectInspectorFactory.writableFloatObjectInspector;
          case DOUBLE:
            return PrimitiveObjectInspectorFactory.writableDoubleObjectInspector;
          case BOOLEAN:
            return PrimitiveObjectInspectorFactory.writableBooleanObjectInspector;
          case BYTE:
            return PrimitiveObjectInspectorFactory.writableByteObjectInspector;
          case SHORT:
            return PrimitiveObjectInspectorFactory.writableShortObjectInspector;
          case INT:
            return PrimitiveObjectInspectorFactory.writableIntObjectInspector;
          case LONG:
            return PrimitiveObjectInspectorFactory.writableLongObjectInspector;
          case BINARY:
            return PrimitiveObjectInspectorFactory.writableBinaryObjectInspector;
          case STRING:
            return PrimitiveObjectInspectorFactory.writableStringObjectInspector;
          case CHAR:
            return PrimitiveObjectInspectorFactory.getPrimitiveWritableObjectInspector(
                (PrimitiveTypeInfo) info);
          case VARCHAR:
            return PrimitiveObjectInspectorFactory.getPrimitiveWritableObjectInspector(
                (PrimitiveTypeInfo) info);
          case TIMESTAMP:
            return PrimitiveObjectInspectorFactory.writableTimestampObjectInspector;
          case DATE:
            return PrimitiveObjectInspectorFactory.writableDateObjectInspector;
          case DECIMAL:
            return PrimitiveObjectInspectorFactory.getPrimitiveWritableObjectInspector(
                (PrimitiveTypeInfo)info);
        case TIMESTAMPLOCALTZ:
          return PrimitiveObjectInspectorFactory.getPrimitiveWritableObjectInspector((PrimitiveTypeInfo) info);
          default:
            throw new IllegalArgumentException("Unknown primitive type " +
              ((PrimitiveTypeInfo) info).getPrimitiveCategory());
        }
      case STRUCT:
        return new OrcStructInspector((StructTypeInfo) info);
      case UNION:
        return new OrcUnion.OrcUnionObjectInspector((UnionTypeInfo) info);
      case MAP:
        return new OrcMapObjectInspector((MapTypeInfo) info);
      case LIST:
        return new OrcListObjectInspector((ListTypeInfo) info);
      default:
        throw new IllegalArgumentException("Unknown type " +
          info.getCategory());
    }
  }
Destructively make this object link to other's values.
@param other the value to point to
ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcStruct.java