private Object convertVarchar(Object writable, int batchIndex, Field field) {
      if (writable == null) {
        writable = new HiveVarcharWritable();
      }
      // Use the basic STRING bytes read to get access, then use our optimal truncate/trim method
      // that does not use Java String objects.
      if (deserializeRead.currentBytes == null) {
        throw new RuntimeException(
                "null varchar entry: batchIndex " + batchIndex);
      }

      int adjustedLength = StringExpr.truncate(
              deserializeRead.currentBytes,
              deserializeRead.currentBytesStart,
              deserializeRead.currentBytesLength,
              field.getMaxLength());

      ((HiveVarcharWritable) writable).set(
              new String(
                      deserializeRead.currentBytes,
                      deserializeRead.currentBytesStart,
                      adjustedLength,
                      Charsets.UTF_8),
              -1);
      return writable;
    }
Initialize for converting the source data type that are going to be read with the
DeserializedRead interface passed to the constructor to the target data types desired in
the VectorizedRowBatch.

No projection -- using the column range 0 .. columnCount-1

@param targetTypeInfos
@param columnsToIncludeTruncated
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorDeserializeRow.java