Class CharVectorExpansionKernel
java.lang.Object
io.deephaven.extensions.barrage.chunk.vector.CharVectorExpansionKernel
- All Implemented Interfaces:
VectorExpansionKernel
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<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 ofLongChunk
andChunk<T>
and produces aChunk<T[]>
.<A extends Any>
WritableChunk<A>expand
(ObjectChunk<Vector<?>, A> source, WritableIntChunk<ChunkPositions> perElementLengthDest) This expands the source from aTVector
per element to a flatT
per element.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
CharVectorExpansionKernel
public CharVectorExpansionKernel()
-
-
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 aTVector
per element to a flatT
per element. The kernel records the number of consecutive elements that belong to a row inperElementLengthDest
. The returned chunk is owned by the caller.- Specified by:
expand
in interfaceVectorExpansionKernel
- Parameters:
source
- the source chunk of TVector to expandperElementLengthDest
- the destination IntChunk for whichdest.get(i + 1) - dest.get(i)
is equivalent tosource.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 ofLongChunk
andChunk<T>
and produces aChunk<T[]>
. The returned chunk is owned by the caller.- Specified by:
contract
in interfaceVectorExpansionKernel
- Parameters:
source
- the source chunk of T to contractperElementLengthDest
- the source IntChunk for whichdest.get(i + 1) - dest.get(i)
is equivalent tosource.get(i).length
outChunk
- the returned chunk from an earlier record batchoutOffset
- the offset to start writing intooutChunk
totalRows
- the total known rows for this column; if known (else 0)- Returns:
- a result chunk of T[]
-