Interface VariableWidthFieldVector

All Superinterfaces:
AutoCloseable, Closeable, DensityAwareVector, ElementAddressableVector, FieldVector, Iterable<ValueVector>, ValueVector, VariableWidthVector, VectorDefinitionSetter
All Known Implementing Classes:
BaseLargeVariableWidthVector, BaseVariableWidthVector, BaseVariableWidthViewVector, LargeVarBinaryVector, LargeVarCharVector, VarBinaryVector, VarCharVector, ViewVarBinaryVector, ViewVarCharVector

public interface VariableWidthFieldVector extends VariableWidthVector, FieldVector, VectorDefinitionSetter
A base interface for common functionalities in variable width vectors.
  • Method Details

    • set

      void set(int index, byte[] value)
      Set the variable length element at the specified index to the supplied byte array.
      Parameters:
      index - position of the element to set
      value - array of bytes with data
    • set

      void set(int index, byte[] value, int start, int length)
      Set the variable length element at the specified index to the supplied byte array.
      Parameters:
      index - position of the element to set
      value - array of bytes with data
      start - start position in the array
      length - length of the data to write
    • set

      void set(int index, ByteBuffer value, int start, int length)
      Set the variable length element at the specified index to the supplied ByteBuffer.
      Parameters:
      index - position of the element to set
      value - ByteBuffer with data
      start - start position in the ByteBuffer
      length - length of the data to write
    • setSafe

      void setSafe(int index, byte[] value)
      Set the variable length element at the specified index to the supplied byte array, and it handles the case where index and length of a new element are beyond the existing capacity of the vector.
      Parameters:
      index - position of the element to set
      value - array of bytes to write
    • setSafe

      void setSafe(int index, byte[] value, int start, int length)
      Set the variable length element at the specified index to the supplied byte array, and it handles the case where index and length of a new element are beyond the existing capacity.
      Parameters:
      index - position of the element to set
      value - array of bytes with data
      start - start position in the array
      length - length of the data to write
    • setSafe

      void setSafe(int index, ByteBuffer value, int start, int length)
      Set the variable length element at the specified index to the supplied ByteBuffer, and it handles the case where index and length of a new element are beyond the existing capacity.
      Parameters:
      index - position of the element to set
      value - ByteBuffer with data
      start - start position in the ByteBuffer
      length - length of the data to write
    • get

      byte[] get(int index)
      Get the variable length element at the specified index.
      Parameters:
      index - position of the element to get
      Returns:
      byte array with the data
    • read

      void read(int index, ReusableBuffer<?> buffer)
      Get the variable length element at the specified index using a ReusableBuffer.
      Parameters:
      index - position of the element to get
      buffer - ReusableBuffer to write the data to
    • getLastSet

      int getLastSet()
      Get the index of the last non-null element in the vector.
      Returns:
      index of the last non-null element
    • setLastSet

      void setLastSet(int value)
      Set the index of the last non-null element in the vector.
      Parameters:
      value - desired index of last non-null element
    • getValueLength

      int getValueLength(int index)
      Get the variable length element at specified index as Text.
      Parameters:
      index - position of an element to get
      Returns:
      greater than length 0 for a non-null element, 0 otherwise
    • fillEmpties

      void fillEmpties(int index)
      Create holes in the vector upto the given index (exclusive). Holes will be created from the current last-set position in the vector.
      Parameters:
      index - target index
    • setValueLengthSafe

      void setValueLengthSafe(int index, int length)
      Sets the value length for an element.
      Parameters:
      index - position of the element to set
      length - length of the element