Class ColumnRegionChunkDictionary<DICT_TYPE,DATA_TYPE,ATTR extends Attributes.Values>
java.lang.Object
com.illumon.iris.db.v2.sources.regioned.ColumnRegionChunkDictionary<DICT_TYPE,DATA_TYPE,ATTR>
- All Implemented Interfaces:
ChunkSource<ATTR>
,DefaultChunkSource<ATTR>
,DefaultChunkSource.SupportsContiguousGet<ATTR>
,FillContextMaker
,GetContextMaker
,Page<ATTR>
,Page.WithDefaults<ATTR>
,PagingChunkSource<ATTR>
,ColumnRegion<ATTR>
,ColumnRegionObject<DATA_TYPE,
,ATTR> Releasable
public class ColumnRegionChunkDictionary<DICT_TYPE,DATA_TYPE,ATTR extends Attributes.Values>
extends Object
implements ColumnRegionObject<DATA_TYPE,ATTR>, Page.WithDefaults<ATTR>, DefaultChunkSource.SupportsContiguousGet<ATTR>
ColumnRegionObject
implementation for regions that support fetching symbols from a dictionary represented as
an ObjectChunk
.-
Nested Class Summary
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.regioned.ColumnRegionObject
ColumnRegionObject.DictionaryKeysWrapper, ColumnRegionObject.IntDictionaryKeysWrapper, ColumnRegionObject.Null<T,
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 inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
DEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAY
Fields inherited from interface com.illumon.iris.db.v2.sources.regioned.ColumnRegion
REGION_MASK
-
Method Summary
Modifier and TypeMethodDescriptionbinSearchMatch
(long firstKey, long lastKey, SortPair sortPair, Object[] sortedKeys) Given that this column is sorted, match the input keys using a binary search.chunkMatch
(long regionFirstKey, OrderedKeys keysToFilter, boolean caseInsensitive, boolean invertMatch, Object[] sortedKeys) boolean
couldInclude
(Object[] sortedKeys) Check if the region could possibly include any of the keys we're searching forstatic <DATA_TYPE,
ATTR extends Attributes.Values>
ColumnRegionObject<DATA_TYPE,ATTR> create
(Class<DATA_TYPE> dataType, Supplier<Chunk<ATTR>> dictionaryChunkSupplier, ParquetFormatColumnLocation location) void
fillChunkAppend
(ChunkSource.FillContext context, WritableChunk<? super ATTR> destination, OrderedKeys rowSequence) Appends the values referenced byorderKeys
ontodestination
.boolean
gatherDictionaryValuesRowSet
(ReadOnlyIndex.SearchIterator keysToVisit, OrderedKeys.Iterator knownKeys, Index.SequentialBuilder sequentialBuilder) getChunk
(ChunkSource.GetContext context, long firstKey, long lastKey) Same asChunkSource.getChunk(GetContext, OrderedKeys)
, except that you pass in the begin and last keys representing the begin and last (inclusive) keys of a single range rather than anOrderedKeys
.Class<?>
getObject
(long elementIndex) Get a single object from this region.long
length()
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.ChunkSource
getChunkType
Methods inherited from interface com.illumon.iris.db.v2.sources.regioned.ColumnRegion
firstRowOffset, mask, specialMatch, supportsSpecialMatching
Methods inherited from interface com.illumon.iris.db.v2.sources.regioned.ColumnRegionObject
gatherDictionaryValuesRowSet, getDictionaryKeysRegion, getDictionaryKeysRegionInt, getDictionaryRegionType, getDictionaryValuesRegion, getObject, skipCache, supportsDictionaryFormat
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.DefaultChunkSource.SupportsContiguousGet
getChunk
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.Page.WithDefaults
fillChunk, fillChunkAppend
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.page.PagingChunkSource
maxRow
Methods inherited from interface com.illumon.iris.db.v2.sources.Releasable
releaseCachedResources
-
Method Details
-
create
public static <DATA_TYPE,ATTR extends Attributes.Values> ColumnRegionObject<DATA_TYPE,ATTR> create(@NotNull Class<DATA_TYPE> dataType, @NotNull Supplier<Chunk<ATTR>> dictionaryChunkSupplier, @NotNull ParquetFormatColumnLocation location) -
getObject
Description copied from interface:ColumnRegionObject
Get a single object from this region.- Specified by:
getObject
in interfaceColumnRegionObject<DICT_TYPE,
DATA_TYPE> - Parameters:
elementIndex
- Element (object) index in the table's address space- Returns:
- The object value at the specified element (object) index
-
getNativeType
- Specified by:
getNativeType
in interfaceChunkSource<DICT_TYPE>
- Specified by:
getNativeType
in interfaceColumnRegionObject<DICT_TYPE,
DATA_TYPE>
-
getChunk
public Chunk<? extends ATTR> getChunk(@NotNull ChunkSource.GetContext context, long firstKey, long lastKey) Description copied from interface:ChunkSource
Same asChunkSource.getChunk(GetContext, OrderedKeys)
, except that you pass in the begin and last keys representing the begin and last (inclusive) keys of a single range rather than anOrderedKeys
. Typically you want to call this only if you don't have anOrderedKeys
, such as during anOrderedKeys.forAllLongRanges(LongRangeConsumer)
call. In this case, it allows you to avoid creating an intermediaryOrderedKeys
object.- Specified by:
getChunk
in interfaceChunkSource<DICT_TYPE>
- Specified by:
getChunk
in interfaceDefaultChunkSource<DICT_TYPE>
- Specified by:
getChunk
in interfaceDefaultChunkSource.SupportsContiguousGet<DICT_TYPE>
- 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 poolfirstKey
- The beginning key (inclusive) of the range to fetch in the chunklastKey
- The last key (inclusive) of the range to fetch in the chunk- Returns:
- A chunk of data corresponding to the keys from the given range.
-
fillChunkAppend
public void fillChunkAppend(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super ATTR> destination, @NotNull OrderedKeys rowSequence) Description copied from interface:Page.WithDefaults
Appends the values referenced byorderKeys
ontodestination
.orderKeys
are assumed to be entirely contained on thisPage
.- Specified by:
fillChunkAppend
in interfacePage.WithDefaults<DICT_TYPE>
-
gatherDictionaryValuesRowSet
public boolean gatherDictionaryValuesRowSet(@NotNull ReadOnlyIndex.SearchIterator keysToVisit, @NotNull OrderedKeys.Iterator knownKeys, @NotNull Index.SequentialBuilder sequentialBuilder) -
length
public long length() -
getLocation
- Specified by:
getLocation
in interfaceColumnRegion<DICT_TYPE>
-
binSearchMatch
public Index binSearchMatch(long firstKey, long lastKey, @NotNull SortPair sortPair, @NotNull Object[] sortedKeys) Description copied from interface:ColumnRegion
Given that this column is sorted, match the input keys using a binary search.- Specified by:
binSearchMatch
in interfaceColumnRegion<DICT_TYPE>
- Parameters:
firstKey
- The first key to searchlastKey
- The last key to searchsortPair
- the sorting definitionsortedKeys
- the keys to search for, in no particular order
-
chunkMatch
public Index chunkMatch(long regionFirstKey, @NotNull OrderedKeys keysToFilter, boolean caseInsensitive, boolean invertMatch, @NotNull Object[] sortedKeys) - Specified by:
chunkMatch
in interfaceColumnRegion<DICT_TYPE>
-
couldInclude
Description copied from interface:ColumnRegion
Check if the region could possibly include any of the keys we're searching for- Specified by:
couldInclude
in interfaceColumnRegion<DICT_TYPE>
- Parameters:
sortedKeys
- the keys to search for- Returns:
- true if the region possibly contains the values
-