Interface PagingChunkSource<ATTR extends Any>
- All Superinterfaces:
ChunkSource<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
PagingChunkSource adds a mask to the ChunkSource, and supports some additional fillChunk methods.
The mask is a bitmask of the lower order bits of the keys in an OrderKeys, 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(FillContext, WritableChunk, RowSequence),
ChunkSource.getChunk(GetContext, RowSequence), ChunkSource.getChunk(GetContext, long, long).
Also, a new method fillChunkAppend(FillContext, WritableChunk, RowSequence.Iterator) is
added, which supports doing a fillChunk incrementally across a series of pages.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.engine.table.ChunkSource
ChunkSource.FillContext, ChunkSource.GetContext, ChunkSource.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 TypeMethodDescriptionvoidfillChunkAppend(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super ATTR> destination, RowSequence.Iterator rowSequenceIterator) Similar toChunkSource.fillChunk(FillContext, WritableChunk, RowSequence), except that the values from the ChunkSource are appended todestination, rather than placed at the beginning.longmask()This mask is applied toRowSequencewhich are passed intoChunkSource.getChunk(ChunkSource.GetContext, RowSequence)andChunkSource.fillChunk(ChunkSource.FillContext, WritableChunk, RowSequence).default longmaxRow(long row) ThemaxRowis the greatest possible row which may reference this ChunkSource.Methods inherited from interface io.deephaven.engine.table.ChunkSource
fillChunk, getChunk, getChunk, getChunkTypeMethods inherited from interface io.deephaven.engine.table.FillContextMaker
makeFillContext, makeFillContextMethods inherited from interface io.deephaven.engine.table.GetContextMaker
makeGetContext, makeGetContext
-
Method Details
-
mask
long mask()This mask is applied toRowSequencewhich are passed intoChunkSource.getChunk(ChunkSource.GetContext, RowSequence)andChunkSource.fillChunk(ChunkSource.FillContext, WritableChunk, RowSequence). This allows thePagingChunkSourcesto be cached, and reused even if they are properly relocated in key space.- Returns:
- the mask for this page, which must be a bitmask representing the some number of lower order bits of a long.
-
maxRow
default long maxRow(long row) The
maxRowis the greatest possible row which may reference this ChunkSource. This method is used byfillChunkAppend(FillContext, WritableChunk, RowSequence.Iterator)to determine which of itsRowSequenceare referencing thisPagingChunkSource.The default implementation assumes that only one
PagingChunkSourceexits for each page reference. That is, there is only onePagingChunkSourceforOrderedKeys with the same bits outside ofmask().It is also possible to pack multiple, non-overlapping
PagingChunkSourcesinto the same page reference. In this case, one typically will want to overridemaxRow. An example such implementation isChunkPage.- Parameters:
row- Any row contained on this page.- Returns:
- the maximum last row of this page, located in the same way as row.
-
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 from the ChunkSource are appended todestination, rather than placed at the beginning.The values to fill into
destinationare specified byrowSequenceIterator, whoseRowSequence.firstRowKey()must exist, and must be represented by thisPagingChunkSource(modulo {#link @mask}), otherwise results are undefined.No more than the elements in
rowSequenceIterator, which are on the same page asRowSequence.firstRowKey(), have their values appended todestination, and consumed fromrowSequenceIterator. Indices are on the same page when the bits outside ofmask()are identical.- Parameters:
context- A context containing all mutable/state related data used in retrieving the Chunk. In particular, the Context may be used to provide a Chunk data pooldestination- The chunk to append the results to.rowSequenceIterator- The iterator to the ordered keys, which contain at least the keys to extract from thisChunkSource. The keys to extract will be at the beginning of iteration order.
-