public Object getWritableKeyValue(VectorHashKeyWrapperBase kw, int keyIndex,
      VectorExpressionWriter keyOutputWriter)
    throws HiveException {

    if (kw.isNull(keyIndex)) {
      return null;
    }

    ColumnVector.Type columnVectorType = columnVectorTypes[keyIndex];
    int columnTypeSpecificIndex = columnTypeSpecificIndices[keyIndex];

    switch (columnVectorType) {
    case LONG:
      return keyOutputWriter.writeValue(
          kw.getLongValue(columnTypeSpecificIndex));
    case DOUBLE:
      return keyOutputWriter.writeValue(
          kw.getDoubleValue(columnTypeSpecificIndex));
    case BYTES:
      return keyOutputWriter.writeValue(
          kw.getBytes(columnTypeSpecificIndex),
          kw.getByteStart(columnTypeSpecificIndex),
          kw.getByteLength(columnTypeSpecificIndex));
    case DECIMAL:
      return keyOutputWriter.writeValue(
          kw.getDecimal(columnTypeSpecificIndex));
    case DECIMAL_64:
      throw new RuntimeException("Getting writable for DECIMAL_64 not supported");
    case TIMESTAMP:
      return keyOutputWriter.writeValue(
          kw.getTimestamp(columnTypeSpecificIndex));
    case INTERVAL_DAY_TIME:
      return keyOutputWriter.writeValue(
          kw.getIntervalDayTime(columnTypeSpecificIndex));
    default:
      throw new HiveException("Unexpected column vector type " + columnVectorType);
    }
  }
Get the row-mode writable object value of a key from a key wrapper
@param keyOutputWriter
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/wrapper/VectorHashKeyWrapperBatch.java