Interface VectorExpansionKernel

All Known Implementing Classes:
BooleanVectorExpansionKernel, ByteVectorExpansionKernel, CharVectorExpansionKernel, DoubleVectorExpansionKernel, FloatVectorExpansionKernel, IntVectorExpansionKernel, LongVectorExpansionKernel, ObjectVectorExpansionKernel, ShortVectorExpansionKernel

public interface VectorExpansionKernel
  • Method Details

    • getComponentType

      static Class<?> getComponentType​(Class<?> type, Class<?> componentType)
    • makeExpansionKernel

      static <T> VectorExpansionKernel makeExpansionKernel​(ChunkType chunkType, Class<T> componentType)
      Returns:
      a kernel that expands a Chunk<VectorT> to pair of LongChunk, Chunk<T>
    • expand

      <A extends Any> WritableChunk<A> expand​(ObjectChunk<Vector<?>,​A> source, WritableIntChunk<ChunkPositions> perElementLengthDest)
      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.
      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

      <A extends Any> WritableObjectChunk<Vector<?>,​A> contract​(Chunk<A> source, IntChunk<ChunkPositions> perElementLengthDest, WritableChunk<A> outChunk, int outOffset, int totalRows)
      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.
      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[]