public static VectorExpressionWriter genVectorExpressionWritable(
        ObjectInspector fieldObjInspector) throws HiveException {

      switch (fieldObjInspector.getCategory()) {
      case PRIMITIVE:
        switch (((PrimitiveObjectInspector) fieldObjInspector).getPrimitiveCategory()) {
          case FLOAT:
            return genVectorExpressionWritableFloat(
                (SettableFloatObjectInspector) fieldObjInspector);
          case DOUBLE:
            return genVectorExpressionWritableDouble(
                (SettableDoubleObjectInspector) fieldObjInspector);
          case BOOLEAN:
            return genVectorExpressionWritableBoolean(
                (SettableBooleanObjectInspector) fieldObjInspector);
          case BYTE:
            return genVectorExpressionWritableByte(
                (SettableByteObjectInspector) fieldObjInspector);
          case SHORT:
            return genVectorExpressionWritableShort(
                (SettableShortObjectInspector) fieldObjInspector);
          case INT:
            return genVectorExpressionWritableInt(
                (SettableIntObjectInspector) fieldObjInspector);
          case LONG:
            return genVectorExpressionWritableLong(
                (SettableLongObjectInspector) fieldObjInspector);
          case VOID:
              return genVectorExpressionWritableVoid(
                  (VoidObjectInspector) fieldObjInspector);
          case BINARY:
            return genVectorExpressionWritableBinary(
                (SettableBinaryObjectInspector) fieldObjInspector);
          case STRING:
            return genVectorExpressionWritableString(
                (SettableStringObjectInspector) fieldObjInspector);
          case CHAR:
              return genVectorExpressionWritableChar(
                  (SettableHiveCharObjectInspector) fieldObjInspector);
          case VARCHAR:
            return genVectorExpressionWritableVarchar(
                (SettableHiveVarcharObjectInspector) fieldObjInspector);
          case TIMESTAMP:
            return genVectorExpressionWritableTimestamp(
                (SettableTimestampObjectInspector) fieldObjInspector);
          case DATE:
            return genVectorExpressionWritableDate(
                (SettableDateObjectInspector) fieldObjInspector);
          case INTERVAL_YEAR_MONTH:
            return genVectorExpressionWritableIntervalYearMonth(
                (SettableHiveIntervalYearMonthObjectInspector) fieldObjInspector);
          case INTERVAL_DAY_TIME:
            return genVectorExpressionWritableIntervalDayTime(
                (SettableHiveIntervalDayTimeObjectInspector) fieldObjInspector);
          case DECIMAL:
            return genVectorExpressionWritableDecimal(
                (SettableHiveDecimalObjectInspector) fieldObjInspector);
          default:
            throw new IllegalArgumentException("Unknown primitive type: " +
              ((PrimitiveObjectInspector) fieldObjInspector).getPrimitiveCategory());
        }

      case LIST:
        return genVectorExpressionWritableList(
            (SettableListObjectInspector) fieldObjInspector);

      case MAP:
        return genVectorExpressionWritableMap(
            (SettableMapObjectInspector) fieldObjInspector);

      case STRUCT:
        return genVectorExpressionWritableStruct(
            (SettableStructObjectInspector) fieldObjInspector);

      case UNION:
        return genVectorExpressionWritableUnion(
            (SettableUnionObjectInspector) fieldObjInspector);

      default:
        throw new IllegalArgumentException("Unknown type " +
            fieldObjInspector.getCategory());
      }
  }
Compiles the appropriate vector expression writer based on an expression info (ExprNodeDesc)
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorExpressionWriterFactory.java