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 class
ColumnChunkPageStore.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 long
firstIndexInRegion
protected PageCache<ATTR>
pageCache
Fields 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 void
close()
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)
long
firstRowOffset()
ChunkType
getChunkType()
Get the most suitableChunkType
for 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.long
length()
long
mask()
This mask is applied toOrderedKeys
which are passed intoChunkSource.getChunk(ChunkSource.GetContext, OrderedKeys)
andChunkSource.fillChunk(ChunkSource.FillContext, WritableChunk, OrderedKeys)
.long
maxRow(long row)
ThemaxRow
is the greatest possible row which may reference this ChunkSource.long
size()
boolean
usesDictionaryOnEveryPage()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
getChunkByFilling, makeFillContext, makeGetContext
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.FillContextMaker
makeFillContext
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.GetContextMaker
makeGetContext
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.page.Page
advanceToNextPage, advanceToNextPage, advanceToNextPageAndGetPositionDistance, firstRow, getRowOffset, lastRow
Methods 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:PagingChunkSource
This mask is applied toOrderedKeys
which are passed intoChunkSource.getChunk(ChunkSource.GetContext, OrderedKeys)
andChunkSource.fillChunk(ChunkSource.FillContext, WritableChunk, OrderedKeys)
. This allows thePagingChunkSource
s to be cached, and reused even if they are properly relocated in key space.- Specified by:
mask
in 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:
firstRowOffset
in 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:PagingChunkSource
The
maxRow
is the greatest possible row which may reference this ChunkSource. This method is used byPagingChunkSource.fillChunkAppend(FillContext, WritableChunk, OrderedKeys.Iterator)
to determine which of itsOrderedKeys
are referencing thisPagingChunkSource
.The default implementation assumes that only one
PagingChunkSource
exits for each page reference. That is, there is only onePagingChunkSource
forOrderedKey
s with the same bits outside ofPagingChunkSource.mask()
.It is also possible to pack multiple, non-overlapping
PagingChunkSource
s into the same page reference. In this case, one typically will want to overridemaxRow
. An example such implementation isChunkPage
.- Specified by:
maxRow
in 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:ChunkSource
Get the most suitableChunkType
for use with this ColumnSource.- Specified by:
getChunkType
in 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceSafeCloseable
-
getNativeType
- Specified by:
getNativeType
in interfaceChunkSource<ATTR extends Attributes.Any>
-
length
public long length()- Specified by:
length
in interfacePage<ATTR extends Attributes.Any>
- Returns:
- the length of this page.
-