Interface ChunkColumnSource<T>

Type Parameters:
T - the data type of the column source
All Superinterfaces:
ChunkSource<Values>, ChunkSource.WithPrev<Values>, ColumnSource<T>, ElementSource<T>, FillContextMaker, GetContextMaker, Releasable, TupleExporter<T>, TupleSource<T>
All Known Implementing Classes:
ByteChunkColumnSource, CharChunkColumnSource, DoubleChunkColumnSource, FloatChunkColumnSource, IntChunkColumnSource, LongChunkColumnSource, ObjectChunkColumnSource, ShortChunkColumnSource

public interface ChunkColumnSource<T> extends ColumnSource<T>
An immutable ColumnSource that is backed by chunks.

The owner of the column source may append chunks to with the addChunk call.

  • Method Details

    • make

      static ChunkColumnSource<?> make(ChunkType chunkType, Class<?> dataType)
      Create a new ChunkColumnSource for the given chunk type and data type.
      Parameters:
      chunkType - the type of chunk
      dataType - the datatype for the newly created column source
      Returns:
      an empty ChunkColumnSource
    • make

      static <T> ChunkColumnSource<T> make(ChunkType chunkType, Class<T> dataType, Class<?> componentType)
      Create a new ChunkColumnSource for the given chunk type and data type.
      Parameters:
      chunkType - the type of chunk
      dataType - the datatype for the newly created column source
      componentType - the component type for the newly created column source (only applies to Objects)
      Returns:
      an empty ChunkColumnSource
    • make

      static ChunkColumnSource<?> make(ChunkType chunkType, Class<?> dataType, gnu.trove.list.array.TLongArrayList sharedOffsetForData)
      Create a new ChunkColumnSource for the given chunk type and data type.
      Parameters:
      chunkType - the type of chunk
      dataType - the datatype for the newly created column source
      sharedOffsetForData - an array list representing the shared offsets for data across several ChunkColumnSources
      Returns:
      an empty ChunkColumnSource
    • make

      static ChunkColumnSource<?> make(ChunkType chunkType, Class<?> dataType, Class<?> componentType, gnu.trove.list.array.TLongArrayList sharedOffsetForData)
      Create a new ChunkColumnSource for the given chunk type and data type.
      Parameters:
      chunkType - the type of chunk
      dataType - the datatype for the newly created column source
      componentType - the component type for the newly created column source (only applies to Objects)
      sharedOffsetForData - an array list representing the shared offsets for data across several ChunkColumnSources
      Returns:
      an empty ChunkColumnSource
    • addChunk

      void addChunk(@NotNull @NotNull WritableChunk<? extends Values> chunk)
      Append a chunk of data to this column source. The chunk must not be empty (i.e., the size must be greater than zero).
      Parameters:
      chunk - the chunk of data to add
    • clear

      void clear()
      Reset the column source to be ready for reuse.

      Clear will discard the currently held chunks. This should not be called if a table will continue to reference the column source; as it violates the immutability contract.

    • getSize

      long getSize()
      Get the size of this column source (one more than the last valid row key).
      Returns:
      the size of this column source