Interface PagingChunkSource<ATTR extends Any>
- All Superinterfaces:
ChunkSource<ATTR>
,DefaultChunkSource<ATTR>
,FillContextMaker
,GetContextMaker
- All Known Subinterfaces:
ChunkPage<ATTR>
,ColumnRegion<ATTR>
,ColumnRegionByte<ATTR>
,ColumnRegionChar<ATTR>
,ColumnRegionDouble<ATTR>
,ColumnRegionFloat<ATTR>
,ColumnRegionInt<ATTR>
,ColumnRegionLong<ATTR>
,ColumnRegionObject<DATA_TYPE,
,ATTR> ColumnRegionObject.SelfDictionaryRegion<DATA_TYPE,
,ATTR> ColumnRegionReferencing<ATTR,
,REFERENCED_COLUMN_REGION> ColumnRegionShort<ATTR>
,Page<ATTR>
,Page.WithDefaults<ATTR>
,Page.WithDefaultsForRepeatingValues<ATTR>
,PageStore<ATTR,
,INNER_ATTR, PAGE> RegionedPageStore<ATTR,
INNER_ATTR, REGION_TYPE>
- All Known Implementing Classes:
AppendOnlyFixedSizePageRegionByte
,AppendOnlyFixedSizePageRegionChar
,AppendOnlyFixedSizePageRegionDouble
,AppendOnlyFixedSizePageRegionFloat
,AppendOnlyFixedSizePageRegionInt
,AppendOnlyFixedSizePageRegionLong
,AppendOnlyFixedSizePageRegionObject
,AppendOnlyFixedSizePageRegionShort
,BooleanChunkPage
,ByteChunkPage
,CharChunkPage
,ChunkHolderPageBoolean
,ChunkHolderPageByte
,ChunkHolderPageChar
,ChunkHolderPageDouble
,ChunkHolderPageFloat
,ChunkHolderPageInt
,ChunkHolderPageLong
,ChunkHolderPageObject
,ChunkHolderPageShort
,ColumnChunkPageStore
,ColumnRegion.Null
,ColumnRegionByte.Constant
,ColumnRegionByte.Null
,ColumnRegionByte.StaticPageStore
,ColumnRegionChar.Constant
,ColumnRegionChar.Null
,ColumnRegionChar.StaticPageStore
,ColumnRegionChunkDictionary
,ColumnRegionDouble.Constant
,ColumnRegionDouble.Null
,ColumnRegionDouble.StaticPageStore
,ColumnRegionFloat.Constant
,ColumnRegionFloat.Null
,ColumnRegionFloat.StaticPageStore
,ColumnRegionInt.Constant
,ColumnRegionInt.Null
,ColumnRegionInt.StaticPageStore
,ColumnRegionLong.Constant
,ColumnRegionLong.Null
,ColumnRegionLong.StaticPageStore
,ColumnRegionObject.Constant
,ColumnRegionObject.DictionaryKeysWrapper
,ColumnRegionObject.Null
,ColumnRegionObject.StaticPageStore
,ColumnRegionReferencing.Null
,ColumnRegionReferencingImpl
,ColumnRegionShort.Constant
,ColumnRegionShort.Null
,ColumnRegionShort.StaticPageStore
,DeferredColumnRegionBase
,DeferredColumnRegionChar
,DeferredColumnRegionDouble
,DeferredColumnRegionFloat
,DeferredColumnRegionInt
,DeferredColumnRegionLong
,DeferredColumnRegionObject
,DeferredColumnRegionReferencing
,DeferredColumnRegionShort
,DoubleChunkPage
,FloatChunkPage
,GenericColumnRegionBase
,IntChunkPage
,LongChunkPage
,ObjectChunkPage
,ParquetColumnRegionBase
,ParquetColumnRegionByte
,ParquetColumnRegionChar
,ParquetColumnRegionDouble
,ParquetColumnRegionFloat
,ParquetColumnRegionInt
,ParquetColumnRegionLong
,ParquetColumnRegionObject
,ParquetColumnRegionShort
,RegionedPageStore.Static
,ShortChunkPage
ChunkSources
across multiple tables (or other references),
PagingChunkSource
adds a mask()
to ChunkSource
and supports some additional
ChunkSource.fillChunk(io.deephaven.engine.table.ChunkSource.FillContext, io.deephaven.chunk.WritableChunk<? super ATTR>, io.deephaven.engine.rowset.RowSequence)
methods.
The mask is a bitmask of the lower order bits of the row keys in a RowSequence
, which specifies the bits from
the RowSequence
which will be used to uniquely specify the offsets into the ChunkSource elements on calls to
ChunkSource.fillChunk(io.deephaven.engine.table.ChunkSource.FillContext, io.deephaven.chunk.WritableChunk<? super ATTR>, io.deephaven.engine.rowset.RowSequence)
and DefaultChunkSource.getChunk(io.deephaven.engine.table.ChunkSource.GetContext, io.deephaven.engine.rowset.RowSequence)
.
Also, a new method fillChunkAppend(FillContext, WritableChunk, RowSequence.Iterator)
is added, which
supports filling a chunk incrementally across a series of pages.
In order to support arbitrary nesting and re-use of PagingChunkSource
implementations, it is required that
all implementations use or extend DefaultGetContext
and
PagingContextHolder
as their GetContext
and
FillContext
, respectively. Nested implementations may thus store their
own state via the inner context
, using sub-classes of
PagingContextHolder
to support chaining of nested state.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.engine.table.ChunkSource
ChunkSource.FillContext, ChunkSource.GetContext
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
fillChunkAppend
(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super ATTR> destination, RowSequence.Iterator rowSequenceIterator) Similar toChunkSource.fillChunk(FillContext, WritableChunk, RowSequence)
, except that the values are appended todestination
, rather than placed at the beginning.default ChunkSource.FillContext
makeFillContext
(int chunkCapacity, @Nullable SharedContext sharedContext) Allocate a newChunkSource.FillContext
for filling chunks from thisFillContextMaker
, typically aChunkSource
.long
mask()
This mask is applied toRowSequences
which are passed intoDefaultChunkSource.getChunk(io.deephaven.engine.table.ChunkSource.GetContext, io.deephaven.engine.rowset.RowSequence)
,ChunkSource.fillChunk(io.deephaven.engine.table.ChunkSource.FillContext, io.deephaven.chunk.WritableChunk<? super ATTR>, io.deephaven.engine.rowset.RowSequence)
, andfillChunkAppend(FillContext, WritableChunk, RowSequence.Iterator)
.default long
maxRow
(long rowKey) ThemaxRow
is the greatest possible row key which may be referenced in this ChunkSource.Methods inherited from interface io.deephaven.engine.table.ChunkSource
fillChunk, getChunkType
Methods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource
getChunk, getChunk, getChunkByFilling, makeGetContext
Methods inherited from interface io.deephaven.engine.table.FillContextMaker
makeFillContext
Methods inherited from interface io.deephaven.engine.table.GetContextMaker
makeGetContext
-
Method Details
-
mask
long mask()This mask is applied toRowSequences
which are passed intoDefaultChunkSource.getChunk(io.deephaven.engine.table.ChunkSource.GetContext, io.deephaven.engine.rowset.RowSequence)
,ChunkSource.fillChunk(io.deephaven.engine.table.ChunkSource.FillContext, io.deephaven.chunk.WritableChunk<? super ATTR>, io.deephaven.engine.rowset.RowSequence)
, andfillChunkAppend(FillContext, WritableChunk, RowSequence.Iterator)
. This allowsPagingChunkSources
to be cached and reused even if they are properly relocated in key space.- Returns:
- The mask for this
PagingChunkSource
, which must be a bitmask representing some number of lower order bits of a long.
-
maxRow
default long maxRow(long rowKey) The
maxRow
is the greatest possible row key which may be referenced in this ChunkSource. This method is used byfillChunkAppend(FillContext, WritableChunk, RowSequence.Iterator)
to determine which of its row keys are supplied by thisPagingChunkSource
.The default implementation assumes that only one
PagingChunkSource
exits for each page reference. That is, there is only onePagingChunkSource
forRowSequences
with the same bits outside ofmask()
.It is also possible to pack multiple, non-overlapping
PagingChunkSources
into the same page reference. In this case, one typically will want to overridemaxRow
. An example such implementation isChunkPage
.- Parameters:
rowKey
- Any row key contained by thisPagingChunkSource
- Returns:
- The maximum last row key of the page, located in the same way as
rowKey
-
fillChunkAppend
void fillChunkAppend(@NotNull @NotNull ChunkSource.FillContext context, @NotNull @NotNull WritableChunk<? super ATTR> destination, @NotNull RowSequence.Iterator rowSequenceIterator) Similar to
ChunkSource.fillChunk(FillContext, WritableChunk, RowSequence)
, except that the values are appended todestination
, rather than placed at the beginning.The values to fill into
destination
are specified byrowSequenceIterator
, whoseRowSequence.firstRowKey()
must exist, and must be represented by thisPagingChunkSource
(modulomask()
), otherwise results are undefined.All values specified by
rowSequenceIterator
that are on the same page as its next row key will be appended todestination
. Row keys are on the same page when the bits outside ofmask()
are identical.- Parameters:
context
- A context containing all mutable/state related data used in fillingdestination
destination
- TheWritableChunk
to append the results torowSequenceIterator
- An iterator over the remaining row keys specifying the values to retrieve, which contains at least the keys to extract from thisPagingChunkSource