Class ColumnChunkPageStore<ATTR extends Attributes.Any>
java.lang.Object
com.illumon.iris.db.v2.locations.parquet.ColumnChunkPageStore<ATTR>
- All Implemented Interfaces:
ChunkSource<ATTR>,DefaultChunkSource<ATTR>,DefaultChunkSource.SupportsContiguousGet<ATTR>,FillContextMaker,GetContextMaker,Page<ATTR>,PageStore<ATTR,ATTR,ChunkPage<ATTR>>,PagingChunkSource<ATTR>,Releasable,SafeCloseable,AutoCloseable
public abstract class ColumnChunkPageStore<ATTR extends Attributes.Any> extends Object implements PageStore<ATTR,ATTR,ChunkPage<ATTR>>, Page<ATTR>, SafeCloseable, Releasable
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classColumnChunkPageStore.CreatorResult<ATTR extends Attributes.Any>Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
ChunkSource.FillContext, ChunkSource.GetContext, ChunkSource.WithPrev<ATTR extends Attributes.Any>Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
DefaultChunkSource.SupportsContiguousGet<ATTR extends Attributes.Any>, DefaultChunkSource.WithPrev<ATTR extends Attributes.Any>Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.chunk.page.Page
Page.WithDefaults<ATTR extends Attributes.Any>, Page.WithDefaultsForRepeatingValues<ATTR extends Attributes.Any> -
Field Summary
Fields Modifier and Type Field Description protected longfirstIndexInRegionprotected PageCache<ATTR>pageCacheFields inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
DEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAY -
Method Summary
Modifier and Type Method Description voidclose()static <ATTR extends Attributes.Any>
ColumnChunkPageStore.CreatorResult<ATTR>create(PageCache<ATTR> pageCache, io.deephaven.parquet.base.ColumnChunkReader columnChunkReader, long mask, long firstIndexInRegion, ToPage<ATTR,?> toPage)longfirstRowOffset()ChunkTypegetChunkType()Get the most suitableChunkTypefor use with this ColumnSource.Class<?>getNativeType()ChunkPage<ATTR>getPageContaining(long row)These implementations don't use the FillContext parameter, so we're create a helper method to ignore it.longlength()longmask()This mask is applied toOrderedKeyswhich are passed intoChunkSource.getChunk(ChunkSource.GetContext, OrderedKeys)andChunkSource.fillChunk(ChunkSource.FillContext, WritableChunk, OrderedKeys).longmaxRow(long row)ThemaxRowis the greatest possible row which may reference this ChunkSource.longsize()booleanusesDictionaryOnEveryPage()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
getChunkByFilling, makeFillContext, makeGetContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.FillContextMaker
makeFillContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.GetContextMaker
makeGetContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.page.Page
advanceToNextPage, advanceToNextPage, advanceToNextPageAndGetPositionDistance, firstRow, getRowOffset, lastRowMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.page.PageStore
doFillChunkAppend, fillChunk, fillChunkAppend, getChunk, getChunk, getPageContaining
-
Field Details
-
pageCache
-
firstIndexInRegion
protected final long firstIndexInRegion
-
-
Method Details
-
create
public static <ATTR extends Attributes.Any> ColumnChunkPageStore.CreatorResult<ATTR> create(@NotNull PageCache<ATTR> pageCache, @NotNull io.deephaven.parquet.base.ColumnChunkReader columnChunkReader, long mask, long firstIndexInRegion, @NotNull ToPage<ATTR,?> toPage) throws IOException- Throws:
IOException
-
mask
public long mask()Description copied from interface:PagingChunkSourceThis mask is applied toOrderedKeyswhich are passed intoChunkSource.getChunk(ChunkSource.GetContext, OrderedKeys)andChunkSource.fillChunk(ChunkSource.FillContext, WritableChunk, OrderedKeys). This allows thePagingChunkSources to be cached, and reused even if they are properly relocated in key space.- Specified by:
maskin interfacePagingChunkSource<ATTR extends Attributes.Any>- Returns:
- the mask for this page, which must be a bitmask representing the some number of lower order bits of a long.
-
firstRowOffset
public long firstRowOffset()- Specified by:
firstRowOffsetin interfacePage<ATTR extends Attributes.Any>- Returns:
- the first row of this page, after applying the
PagingChunkSource.mask(), which refers to the first row of this page.
-
maxRow
public long maxRow(long row)Description copied from interface:PagingChunkSourceThe
maxRowis the greatest possible row which may reference this ChunkSource. This method is used byPagingChunkSource.fillChunkAppend(FillContext, WritableChunk, OrderedKeys.Iterator)to determine which of itsOrderedKeysare 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 ofPagingChunkSource.mask().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.- Specified by:
maxRowin interfacePagingChunkSource<ATTR extends Attributes.Any>- Parameters:
row- Any row contained on this page.- Returns:
- the maximum last row of this page, located in the same way as row.
-
size
public long size() -
getChunkType
Description copied from interface:ChunkSourceGet the most suitableChunkTypefor use with this ColumnSource.- Specified by:
getChunkTypein interfaceChunkSource<ATTR extends Attributes.Any>- Returns:
- The ChunkType
-
getPageContaining
These implementations don't use the FillContext parameter, so we're create a helper method to ignore it. -
usesDictionaryOnEveryPage
public boolean usesDictionaryOnEveryPage()- See Also:
ColumnChunkReader.usesDictionaryOnEveryPage()
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSafeCloseable
-
getNativeType
- Specified by:
getNativeTypein interfaceChunkSource<ATTR extends Attributes.Any>
-
length
public long length()- Specified by:
lengthin interfacePage<ATTR extends Attributes.Any>- Returns:
- the length of this page.
-