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_ARRAYFields 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) booleancouldInclude(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) voidfillChunkAppend(ChunkSource.FillContext context, WritableChunk<? super ATTR> destination, OrderedKeys rowSequence) Appends the values referenced byorderKeysontodestination.booleangatherDictionaryValuesRowSet(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.longlength()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.ChunkSource
getChunkTypeMethods inherited from interface com.illumon.iris.db.v2.sources.regioned.ColumnRegion
firstRowOffset, mask, specialMatch, supportsSpecialMatchingMethods inherited from interface com.illumon.iris.db.v2.sources.regioned.ColumnRegionObject
gatherDictionaryValuesRowSet, getDictionaryKeysRegion, getDictionaryKeysRegionInt, getDictionaryRegionType, getDictionaryValuesRegion, getObject, skipCache, supportsDictionaryFormatMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
getChunkByFilling, makeFillContext, makeGetContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource.SupportsContiguousGet
getChunkMethods 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.Page.WithDefaults
fillChunk, fillChunkAppendMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.page.PagingChunkSource
maxRowMethods 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:ColumnRegionObjectGet a single object from this region.- Specified by:
getObjectin 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:
getNativeTypein interfaceChunkSource<DICT_TYPE>- Specified by:
getNativeTypein interfaceColumnRegionObject<DICT_TYPE,DATA_TYPE>
-
getChunk
public Chunk<? extends ATTR> getChunk(@NotNull ChunkSource.GetContext context, long firstKey, long lastKey) Description copied from interface:ChunkSourceSame 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 intermediaryOrderedKeysobject.- Specified by:
getChunkin interfaceChunkSource<DICT_TYPE>- Specified by:
getChunkin interfaceDefaultChunkSource<DICT_TYPE>- Specified by:
getChunkin 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.WithDefaultsAppends the values referenced byorderKeysontodestination.orderKeysare assumed to be entirely contained on thisPage.- Specified by:
fillChunkAppendin 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:
getLocationin interfaceColumnRegion<DICT_TYPE>
-
binSearchMatch
public Index binSearchMatch(long firstKey, long lastKey, @NotNull SortPair sortPair, @NotNull Object[] sortedKeys) Description copied from interface:ColumnRegionGiven that this column is sorted, match the input keys using a binary search.- Specified by:
binSearchMatchin 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:
chunkMatchin interfaceColumnRegion<DICT_TYPE>
-
couldInclude
Description copied from interface:ColumnRegionCheck if the region could possibly include any of the keys we're searching for- Specified by:
couldIncludein interfaceColumnRegion<DICT_TYPE>- Parameters:
sortedKeys- the keys to search for- Returns:
- true if the region possibly contains the values
-