public void addPartitionColsToBatch(ColumnVector col, Object value, int colIndex)
  {
    String partitionColumnName = rowColumnNames[colIndex];
    PrimitiveTypeInfo primitiveTypeInfo = (PrimitiveTypeInfo) rowColumnTypeInfos[colIndex];
    switch (primitiveTypeInfo.getPrimitiveCategory()) {
    case BOOLEAN: {
      LongColumnVector lcv = (LongColumnVector) col;
      if (value == null) {
        lcv.noNulls = false;
        lcv.isNull[0] = true;
        lcv.isRepeating = true;
      } else {
        lcv.fill((Boolean) value == true ? 1 : 0);
      }
    }
    break;

    case BYTE: {
      LongColumnVector lcv = (LongColumnVector) col;
      if (value == null) {
        lcv.noNulls = false;
        lcv.isNull[0] = true;
        lcv.isRepeating = true;
      } else {
        lcv.fill((Byte) value);
      }
    }
    break;

    case SHORT: {
      LongColumnVector lcv = (LongColumnVector) col;
      if (value == null) {
        lcv.noNulls = false;
        lcv.isNull[0] = true;
        lcv.isRepeating = true;
      } else {
        lcv.fill((Short) value);
      }
    }
    break;

    case INT: {
      LongColumnVector lcv = (LongColumnVector) col;
      if (value == null) {
        lcv.noNulls = false;
        lcv.isNull[0] = true;
        lcv.isRepeating = true;
      } else {
        lcv.fill((Integer) value);
      }
    }
    break;

    case LONG: {
      LongColumnVector lcv = (LongColumnVector) col;
      if (value == null) {
        lcv.noNulls = false;
        lcv.isNull[0] = true;
        lcv.isRepeating = true;
      } else {
        lcv.fill((Long) value);
      }
    }
    break;

    case DATE: {
      LongColumnVector lcv = (LongColumnVector) col;
      if (value == null) {
        lcv.noNulls = false;
        lcv.isNull[0] = true;
        lcv.isRepeating = true;
      } else {
        lcv.fill(DateWritableV2.dateToDays((Date) value));
      }
    }
    break;

    case TIMESTAMP: {
      TimestampColumnVector lcv = (TimestampColumnVector) col;
      if (value == null) {
        lcv.noNulls = false;
        lcv.isNull[0] = true;
        lcv.isRepeating = true;
      } else {
        lcv.fill(((Timestamp) value).toSqlTimestamp());
      }
    }
    break;

    case INTERVAL_YEAR_MONTH: {
      LongColumnVector lcv = (LongColumnVector) col;
      if (value == null) {
        lcv.noNulls = false;
        lcv.isNull[0] = true;
        lcv.isRepeating = true;
      } else {
        lcv.fill(((HiveIntervalYearMonth) value).getTotalMonths());
      }
    }
    break;

    case INTERVAL_DAY_TIME: {
      IntervalDayTimeColumnVector icv = (IntervalDayTimeColumnVector) col;
      if (value == null) {
        icv.noNulls = false;
        icv.isNull[0] = true;
        icv.isRepeating = true;
      } else {
        icv.fill(((HiveIntervalDayTime) value));
      }
    }
    break;

    case FLOAT: {
      DoubleColumnVector dcv = (DoubleColumnVector) col;
      if (value == null) {
        dcv.noNulls = false;
        dcv.isNull[0] = true;
        dcv.isRepeating = true;
      } else {
        dcv.fill((Float) value);
      }
    }
    break;

    case DOUBLE: {
      DoubleColumnVector dcv = (DoubleColumnVector) col;
      if (value == null) {
        dcv.noNulls = false;
        dcv.isNull[0] = true;
        dcv.isRepeating = true;
      } else {
        dcv.fill((Double) value);
      }
    }
    break;

    case DECIMAL: {
      DataTypePhysicalVariation dataTypePhysicalVariation = rowDataTypePhysicalVariations != null ?
        rowDataTypePhysicalVariations[colIndex] : DataTypePhysicalVariation.NONE;

      if (dataTypePhysicalVariation == DataTypePhysicalVariation.DECIMAL_64) {
        Decimal64ColumnVector dv = (Decimal64ColumnVector) col;
        if (value == null) {
          dv.noNulls = false;
          dv.isNull[0] = true;
          dv.isRepeating = true;
        } else {
          dv.fill(((HiveDecimal) value).longValue());
        }
      } else {
        DecimalColumnVector dv = (DecimalColumnVector) col;
        if (value == null) {
          dv.noNulls = false;
          dv.isNull[0] = true;
          dv.isRepeating = true;
        } else {
          dv.fill((HiveDecimal) value);
        }
      }
    }
    break;

    case BINARY: {
        BytesColumnVector bcv = (BytesColumnVector) col;
        byte[] bytes = (byte[]) value;
        if (bytes == null) {
          bcv.noNulls = false;
          bcv.isNull[0] = true;
          bcv.isRepeating = true;
        } else {
          bcv.fill(bytes);
        }
      }
      break;

    case STRING:
    case CHAR:
    case VARCHAR: {
      BytesColumnVector bcv = (BytesColumnVector) col;
      if (value == null) {
        bcv.noNulls = false;
        bcv.isNull[0] = true;
        bcv.isRepeating = true;
      } else {
        String sVal = value.toString();
        bcv.fill(sVal.getBytes());
      }
    }
    break;

    default:
      throw new RuntimeException("Unable to recognize the partition type " + primitiveTypeInfo.getPrimitiveCategory() +
          " for column " + partitionColumnName);
    }
  }
Add the partition values to the batch

@param batch
@param partitionValues
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java