Interface RowRedirection
- All Superinterfaces:
ChunkSource<RowKeys>
,ChunkSource.WithPrev<RowKeys>
,DefaultChunkSource<RowKeys>
,DefaultChunkSource.WithPrev<RowKeys>
,FillContextMaker
,FillUnordered<RowKeys>
,GetContextMaker
- All Known Subinterfaces:
WritableRowRedirection
- All Known Implementing Classes:
ContiguousWritableRowRedirection
,GroupedWritableRowRedirection
,IntColumnSourceRowRedirection
,IntColumnSourceWritableRowRedirection
,InverseWrappedRowSetRowRedirection
,LongColumnSourceRowRedirection
,LongColumnSourceWritableRowRedirection
,SingleValueRowRedirection
,WrappedRowSetRowRedirection
,WritableRowRedirectionLockFree
,WritableSingleValueRowRedirection
public interface RowRedirection
extends DefaultChunkSource.WithPrev<RowKeys>, FillUnordered<RowKeys>
Data structure for mapping one "outer" row key space to another "inner" row key space. Query engine components use
this when a
RowSet
must be flattened or re-ordered.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.engine.table.ChunkSource
ChunkSource.FillContext, ChunkSource.GetContext, ChunkSource.WithPrev<ATTR extends Any>
Nested classes/interfaces inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource
DefaultChunkSource.SupportsContiguousGet<ATTR extends Any>, DefaultChunkSource.WithPrev<ATTR extends Any>
-
Field Summary
Fields inherited from interface io.deephaven.engine.table.ChunkSource
DEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAY
Fields inherited from interface io.deephaven.engine.table.ChunkSource.WithPrev
ZERO_LENGTH_CHUNK_SOURCE_WITH_PREV_ARRAY
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
If this RowRedirection is guaranteed to map outer keys in ascending order to inner keys in ascending order; then return true; all other redirections must return false.default void
fillChunk
(@NotNull ChunkSource.FillContext fillContext, @NotNull WritableChunk<? super RowKeys> innerRowKeys, @NotNull RowSequence outerRowKeys) Lookup each element in aRowSequence
and write the result to aWritableLongChunk
.default void
fillChunkUnordered
(@NotNull ChunkSource.FillContext fillContext, @NotNull WritableChunk<? super RowKeys> innerRowKeys, @NotNull LongChunk<? extends RowKeys> outerRowKeys) Lookup each element in aLongChunk
and write the result to aWritableLongChunk
.default void
fillPrevChunk
(@NotNull ChunkSource.FillContext fillContext, @NotNull WritableChunk<? super RowKeys> innerRowKeys, @NotNull RowSequence outerRowKeys) Lookup each element in aRowSequence
using previous values and write the result to aWritableLongChunk
.default void
fillPrevChunkUnordered
(@NotNull ChunkSource.FillContext fillContext, @NotNull WritableChunk<? super RowKeys> innerRowKeys, @NotNull LongChunk<? extends RowKeys> outerRowKeys) Lookup each element in aLongChunk
using previous values and write the result to aWritableLongChunk
.long
get
(long outerRowKey) Simple redirected lookup.default ChunkType
Get the most suitableChunkType
for use with this ChunkSource.long
getPrev
(long outerRowKey) Simple redirected lookup, using previous values.default boolean
default boolean
Returns true if this column source can efficiently provide an unordered fill.default WritableRowRedirection
Cast this RowRedirection reference to aWritableRowRedirection
.Methods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource
getChunk, getChunk, getChunkByFilling, makeFillContext, makeGetContext
Methods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource.WithPrev
getPrevChunk, getPrevChunk, getPrevChunkByFilling, getPrevSource
Methods inherited from interface io.deephaven.engine.table.FillContextMaker
makeFillContext
Methods inherited from interface io.deephaven.engine.table.GetContextMaker
makeGetContext
-
Method Details
-
get
long get(long outerRowKey) Simple redirected lookup.- Parameters:
outerRowKey
- The "outer" row key- Returns:
- The corresponding "inner" row key, or
RowSequence.NULL_ROW_KEY
if no mapping exists
-
getPrev
long getPrev(long outerRowKey) Simple redirected lookup, using previous values.- Parameters:
outerRowKey
- The "outer" row key- Returns:
- The corresponding "inner" row key, or
RowSequence.NULL_ROW_KEY
if no mapping exists
-
getChunkType
Description copied from interface:ChunkSource
Get the most suitableChunkType
for use with this ChunkSource.- Specified by:
getChunkType
in interfaceChunkSource<RowKeys>
- Returns:
- The ChunkType
-
providesFillUnordered
default boolean providesFillUnordered()Description copied from interface:FillUnordered
Returns true if this column source can efficiently provide an unordered fill. If this method returns false, then fillChunkUnordered and fillPrevChunkUnordered may throw an UnsupportedOperationException.- Specified by:
providesFillUnordered
in interfaceFillUnordered<RowKeys>
- Returns:
- if this column source can provide an unordered fill
-
fillChunk
default void fillChunk(@NotNull @NotNull ChunkSource.FillContext fillContext, @NotNull @NotNull WritableChunk<? super RowKeys> innerRowKeys, @NotNull @NotNull RowSequence outerRowKeys) Lookup each element in aRowSequence
and write the result to aWritableLongChunk
.- Specified by:
fillChunk
in interfaceChunkSource<RowKeys>
- Parameters:
fillContext
- Thefill context
innerRowKeys
- The resultWritableLongChunk
outerRowKeys
- The row keys to lookup in this RowRedirection
-
fillChunkUnordered
default void fillChunkUnordered(@NotNull @NotNull ChunkSource.FillContext fillContext, @NotNull @NotNull WritableChunk<? super RowKeys> innerRowKeys, @NotNull @NotNull LongChunk<? extends RowKeys> outerRowKeys) Lookup each element in aLongChunk
and write the result to aWritableLongChunk
.- Specified by:
fillChunkUnordered
in interfaceFillUnordered<RowKeys>
- Parameters:
fillContext
- The FillContextinnerRowKeys
- The result chunkouterRowKeys
- The row keys to lookup in this RowRedirection
-
fillPrevChunk
default void fillPrevChunk(@NotNull @NotNull ChunkSource.FillContext fillContext, @NotNull @NotNull WritableChunk<? super RowKeys> innerRowKeys, @NotNull @NotNull RowSequence outerRowKeys) Lookup each element in aRowSequence
using previous values and write the result to aWritableLongChunk
.- Specified by:
fillPrevChunk
in interfaceChunkSource.WithPrev<RowKeys>
- Parameters:
fillContext
- Thefill context
innerRowKeys
- The resultWritableLongChunk
outerRowKeys
- The row keys to lookup in this RowRedirection
-
fillPrevChunkUnordered
default void fillPrevChunkUnordered(@NotNull @NotNull ChunkSource.FillContext fillContext, @NotNull @NotNull WritableChunk<? super RowKeys> innerRowKeys, @NotNull @NotNull LongChunk<? extends RowKeys> outerRowKeys) Lookup each element in aLongChunk
using previous values and write the result to aWritableLongChunk
.- Specified by:
fillPrevChunkUnordered
in interfaceFillUnordered<RowKeys>
- Parameters:
fillContext
- The FillContextinnerRowKeys
- The result chunkouterRowKeys
- The row keys to lookup in this RowRedirection
-
ascendingMapping
default boolean ascendingMapping()If this RowRedirection is guaranteed to map outer keys in ascending order to inner keys in ascending order; then return true; all other redirections must return false.- Returns:
- if our output maintains ascending order
-
isWritable
default boolean isWritable()- Returns:
- Whether this RowRedirection is actually
writable
-
writableCast
Cast this RowRedirection reference to a
WritableRowRedirection
.- Returns:
this
cast to aWritableRowRedirection
- Throws:
ClassCastException
- Ifthis
is not aWritableRowRedirection
-