private void initConvertSourceEntry(int logicalColumnIndex, TypeInfo convertSourceTypeInfo) {
    isConvert[logicalColumnIndex] = true;
    final Category convertSourceCategory = convertSourceTypeInfo.getCategory();
    convertSourceOI[logicalColumnIndex] =
        TypeInfoUtils.getStandardWritableObjectInspectorFromTypeInfo(convertSourceTypeInfo);

    if (convertSourceCategory == Category.PRIMITIVE) {
      // These need to be based on the target.
      final PrimitiveCategory targetPrimitiveCategory =
          ((PrimitiveTypeInfo) targetTypeInfos[logicalColumnIndex]).getPrimitiveCategory();
      switch (targetPrimitiveCategory) {
      case DATE:
        convertTargetWritables[logicalColumnIndex] = new DateWritableV2();
        break;
      case STRING:
        convertTargetWritables[logicalColumnIndex] = new Text();
        break;
      default:
        // No additional data type specific setting.
        break;
      }
    }
  }
This class assigns specified columns of a row from a Writable row objects.

The caller provides the data types and projection column numbers of a subset of the columns
to assign.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorAssignRow.java