Class ByteVectorExpansionKernel

java.lang.Object
io.deephaven.extensions.barrage.chunk.vector.ByteVectorExpansionKernel
All Implemented Interfaces:
VectorExpansionKernel

public class ByteVectorExpansionKernel extends Object implements VectorExpansionKernel
  • Field Details

  • Constructor Details

    • ByteVectorExpansionKernel

      public ByteVectorExpansionKernel()
  • Method Details

    • expand

      public <A extends Any> WritableChunk<A> expand(ObjectChunk<Vector<?>,A> source, WritableIntChunk<ChunkPositions> perElementLengthDest)
      Description copied from interface: VectorExpansionKernel
      This expands the source from a TVector per element to a flat T per element. The kernel records the number of consecutive elements that belong to a row in perElementLengthDest. The returned chunk is owned by the caller.
      Specified by:
      expand in interface VectorExpansionKernel
      Parameters:
      source - the source chunk of TVector to expand
      perElementLengthDest - the destination IntChunk for which dest.get(i + 1) - dest.get(i) is equivalent to source.get(i).length
      Returns:
      an unrolled/flattened chunk of T
    • contract

      public <A extends Any> WritableObjectChunk<Vector<?>,A> contract(Chunk<A> source, IntChunk<ChunkPositions> perElementLengthDest, WritableChunk<A> outChunk, int outOffset, int totalRows)
      Description copied from interface: VectorExpansionKernel
      This contracts the source from a pair of LongChunk and Chunk<T> and produces a Chunk<T[]>. The returned chunk is owned by the caller.
      Specified by:
      contract in interface VectorExpansionKernel
      Parameters:
      source - the source chunk of T to contract
      perElementLengthDest - the source IntChunk for which dest.get(i + 1) - dest.get(i) is equivalent to source.get(i).length
      outChunk - the returned chunk from an earlier record batch
      outOffset - the offset to start writing into outChunk
      totalRows - the total known rows for this column; if known (else 0)
      Returns:
      a result chunk of T[]