Class HeapBytesVector

  • All Implemented Interfaces:
    Serializable, BytesColumnVector, ColumnVector, WritableBytesVector, WritableColumnVector

    @Internal
    public class HeapBytesVector
    extends AbstractHeapVector
    implements WritableBytesVector
    This class supports string and binary data by value reference -- i.e. each field is explicitly present, as opposed to provided by a dictionary reference. In some cases, all the values will be in the same byte array to begin with, but this need not be the case. If each value is in a separate byte array to start with, or not all of the values are in the same original byte array, you can still assign data by reference into this column vector. This gives flexibility to use this in multiple situations.

    When setting data by reference, the caller is responsible for allocating the byte arrays used to hold the data. You can also set data by value, as long as you call the initBuffer() method first. You can mix "by value" and "by reference" in the same column vector, though that use is probably not typical.

    See Also:
    Serialized Form
    • Field Detail

      • start

        public int[] start
        start offset of each field.
      • length

        public int[] length
        The length of each field.
      • buffer

        public byte[] buffer
        buffer to use when actually copying in data.
    • Constructor Detail

      • HeapBytesVector

        public HeapBytesVector​(int size)
        Don't call this constructor except for testing purposes.
        Parameters:
        size - number of elements in the column vector