public void addValue(Type type, Object field) {
    switch (type) {
    case BOOLEAN_TYPE:
      nulls.set(size, field == null);
      boolVars()[size] = field == null ? true : (Boolean) field;
      break;
    case TINYINT_TYPE:
      nulls.set(size, field == null);
      byteVars()[size] = field == null ? 0 : (Byte) field;
      break;
    case SMALLINT_TYPE:
      nulls.set(size, field == null);
      shortVars()[size] = field == null ? 0 : (Short) field;
      break;
    case INT_TYPE:
      nulls.set(size, field == null);
      intVars()[size] = field == null ? 0 : (Integer) field;
      break;
    case BIGINT_TYPE:
      nulls.set(size, field == null);
      longVars()[size] = field == null ? 0 : (Long) field;
      break;
    case FLOAT_TYPE:
      nulls.set(size, field == null);
      doubleVars()[size] = field == null ? 0.0 : Double.parseDouble(field.toString());
      break;
    case DOUBLE_TYPE:
      nulls.set(size, field == null);
      doubleVars()[size] = field == null ? 0 : (Double) field;
      break;
    case BINARY_TYPE:
      nulls.set(binaryVars.size(), field == null);
      binaryVars.add(field == null ? EMPTY_BINARY : ByteBuffer.wrap((byte[]) field));
      break;
    default:
      nulls.set(stringVars.size(), field == null);
      stringVars.add(field == null ? EMPTY_STRING : String.valueOf(field));
      break;
    }
    size++;
  }
Get a subset of this ColumnBuffer, starting from the 1st value.

@param end index after the last value to include
serde/src/java/org/apache/hadoop/hive/serde2/thrift/ColumnBuffer.java