Class ParquetColumnRegionBase<ATTR extends Attributes.Values>
- All Implemented Interfaces:
ChunkSource<ATTR>,FillContextMaker,GetContextMaker,Page<ATTR>,PagingChunkSource<ATTR>,ColumnRegion<ATTR>,Releasable
- Direct Known Subclasses:
ParquetColumnRegionByte,ParquetColumnRegionChar,ParquetColumnRegionDouble,ParquetColumnRegionFloat,ParquetColumnRegionInt,ParquetColumnRegionLong,ParquetColumnRegionObject,ParquetColumnRegionShort
-
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.ColumnRegion
ColumnRegion.Null<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 TypeMethodDescriptionchunkMatch(long regionFirstKey, OrderedKeys keysToFilter, boolean caseInsensitive, boolean invertMatch, Object[] keys) voidfillChunk(ChunkSource.FillContext context, WritableChunk<? super ATTR> destination, OrderedKeys orderedKeys) Populates the given destination chunk with data corresponding to the keys from the givenOrderedKeys.voidfillChunkAppend(ChunkSource.FillContext context, WritableChunk<? super ATTR> destination, OrderedKeys.Iterator orderedKeysIterator) Similar toChunkSource.fillChunk(FillContext, WritableChunk, OrderedKeys), except that the values from the ChunkSource are appended todestination, rather than placed at the beginning.longgetChunk(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.getChunk(ChunkSource.GetContext context, OrderedKeys orderedKeys) Returns a chunk of data corresponding to the keys from the givenOrderedKeys.getChunkPageContaining(long elementIndex) final Class<?>final longlength()makeFillContext(int chunkCapacity, SharedContext sharedContext) Allocate a newChunkSource.FillContextfor filling chunks from thisFillContextMaker, typically aChunkSource.makeGetContext(int chunkCapacity, SharedContext sharedContext) Allocate a newChunkSource.GetContextfor retrieving chunks from thisGetContextMaker, typically aChunkSource.longmaxRow(long row) ThemaxRowis the greatest possible row which may reference this ChunkSource.voidRelease any resources held for caching purposes.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
binSearchMatch, couldInclude, mask, specialMatch, supportsSpecialMatchingMethods 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, lastRow
-
Method Details
-
firstRowOffset
public long firstRowOffset()- Specified by:
firstRowOffsetin interfaceColumnRegion<ATTR extends Attributes.Values>- Specified by:
firstRowOffsetin interfacePage<ATTR extends Attributes.Values>- 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.Values>- Parameters:
row- Any row contained on this page.- Returns:
- the maximum last row of this page, located in the same way as row.
-
length
public final long length()- Specified by:
lengthin interfacePage<ATTR extends Attributes.Values>- Returns:
- the length of this page.
-
getNativeType
- Specified by:
getNativeTypein interfaceChunkSource<ATTR extends Attributes.Values>
-
getChunk
public Chunk<? extends ATTR> getChunk(@NotNull ChunkSource.GetContext context, @NotNull OrderedKeys orderedKeys) Description copied from interface:ChunkSourceReturns a chunk of data corresponding to the keys from the givenOrderedKeys.- Specified by:
getChunkin interfaceChunkSource<ATTR extends Attributes.Values>- 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 poolorderedKeys- AnOrderedKeysrepresenting the keys to be fetched- Returns:
- A chunk of data corresponding to the keys from the given
OrderedKeys
-
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<ATTR extends Attributes.Values>- 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.
-
fillChunk
public void fillChunk(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super ATTR> destination, @NotNull OrderedKeys orderedKeys) Description copied from interface:ChunkSourcePopulates the given destination chunk with data corresponding to the keys from the givenOrderedKeys.- Specified by:
fillChunkin interfaceChunkSource<ATTR extends Attributes.Values>- Parameters:
context- A context containing all mutable/state related data used in retrieving the Chunk.destination- The chunk to be populated according toorderedKeys. No assumptions shall be made about the size of the chunk shall be made. The chunk will be populated from position [0,orderedKeys.size()).orderedKeys- AnOrderedKeysrepresenting the keys to be fetched
-
fillChunkAppend
public void fillChunkAppend(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super ATTR> destination, @NotNull OrderedKeys.Iterator orderedKeysIterator) Description copied from interface:PagingChunkSourceSimilar to
ChunkSource.fillChunk(FillContext, WritableChunk, OrderedKeys), except that the values from the ChunkSource are appended todestination, rather than placed at the beginning.The values to fill into
destinationare specified byorderedKeysIterator, whoseOrderedKeys.firstKey()must exist, and must be represented by thisPagingChunkSource(modulo {#link @mask}), otherwise results are undefined.No more than the elements in
orderedKeysIterator, which are on the same page asOrderedKeys.firstKey(), have their values appended todestination, and consumed fromorderedKeysIterator. Keys are on the same page when the bits outside ofPagingChunkSource.mask()are identical.- Specified by:
fillChunkAppendin interfacePagingChunkSource<ATTR extends Attributes.Values>- 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.orderedKeysIterator- 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.
-
getChunkPageContaining
-
releaseCachedResources
@OverridingMethodsMustInvokeSuper public void releaseCachedResources()Description copied from interface:ReleasableRelease any resources held for caching purposes. Implementations need not guarantee that they are safe for normal use concurrently with invocations of this method.- Specified by:
releaseCachedResourcesin interfaceReleasable
-
getLocation
- Specified by:
getLocationin interfaceColumnRegion<ATTR extends Attributes.Values>
-
chunkMatch
public Index chunkMatch(long regionFirstKey, @NotNull OrderedKeys keysToFilter, boolean caseInsensitive, boolean invertMatch, @NotNull Object[] keys) - Specified by:
chunkMatchin interfaceColumnRegion<ATTR extends Attributes.Values>
-