@Override
    void store(ColumnVector colVector, Field field, int batchIndex, boolean canRetainByteRef) throws IOException {
      // Use the basic STRING bytes read to get access, then use our optimal truncate/trim method
      // that does not use Java String objects.
      final BytesColumnVector bytesColVec = ((BytesColumnVector) colVector);
      if (deserializeRead.currentExternalBufferNeeded) {
        // Write directly into our BytesColumnVector value buffer.
        bytesColVec.ensureValPreallocated(deserializeRead.currentExternalBufferNeededLen);
        final byte[] convertBuffer = bytesColVec.getValPreallocatedBytes();
        final int convertBufferStart = bytesColVec.getValPreallocatedStart();
        deserializeRead.copyToExternalBuffer(
                convertBuffer,
                convertBufferStart);
        bytesColVec.setValPreallocated(
                batchIndex,
                StringExpr.truncate(
                        convertBuffer,
                        convertBufferStart,
                        deserializeRead.currentExternalBufferNeededLen,
                        field.getMaxLength()));
      } else if (canRetainByteRef && inputBytes == deserializeRead.currentBytes) {
        bytesColVec.setRef(
                batchIndex,
                deserializeRead.currentBytes,
                deserializeRead.currentBytesStart,
                StringExpr.truncate(
                        deserializeRead.currentBytes,
                        deserializeRead.currentBytesStart,
                        deserializeRead.currentBytesLength,
                        field.getMaxLength()));
      } else {
        bytesColVec.setVal(
                batchIndex,
                deserializeRead.currentBytes,
                deserializeRead.currentBytesStart,
                StringExpr.truncate(
                        deserializeRead.currentBytes,
                        deserializeRead.currentBytesStart,
                        deserializeRead.currentBytesLength,
                        field.getMaxLength()));
      }
    }
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