Interface ColumnRegionObject<DATA_TYPE,ATTR extends Any>

All Superinterfaces:
ChunkSource<ATTR>, ColumnRegion<ATTR>, DefaultChunkSource<ATTR>, FillContextMaker, GetContextMaker, Page<ATTR>, PagingChunkSource<ATTR>, Releasable
All Known Subinterfaces:
ColumnRegionObject.SelfDictionaryRegion<DATA_TYPE,ATTR>
All Known Implementing Classes:
AppendOnlyFixedSizePageRegionObject, ColumnRegionChunkDictionary, ColumnRegionObject.Constant, ColumnRegionObject.Null, ColumnRegionObject.StaticPageStore, DeferredColumnRegionObject, ParquetColumnRegionObject

public interface ColumnRegionObject<DATA_TYPE,ATTR extends Any> extends ColumnRegion<ATTR>
Column region interface for regions that support fetching objects.
  • Method Details

    • getObject

      DATA_TYPE getObject(long elementIndex)
      Get a single object from this region.
      Parameters:
      elementIndex - Element row key in the table's address space
      Returns:
      The object value at the specified element row key
    • getObject

      default DATA_TYPE getObject(@NotNull @NotNull ChunkSource.FillContext context, long elementIndex)
      Get a single object from this region.
      Parameters:
      context - A PagingContextHolder to enable resource caching where suitable, with current region index pointing to this region
      elementIndex - Element row key in the table's address space
      Returns:
      The object value at the specified element row key
    • supportsDictionaryFormat

      default RegionVisitResult supportsDictionaryFormat(@NotNull RowSet.SearchIterator keysToVisit)
      Check if this region can expose an alternate form as paired regions of long keys and DATA_TYPE values covering all of its row keys in keysToVisit.

      Both alternate regions must use the same or smaller row key space as this one. Indices fetched from the keys region must represent valid element indices in the values region. Values regions must support gatherDictionaryValuesRowSet(RowSet.SearchIterator, RowSequence.Iterator, RowSetBuilderSequential).

      Use getDictionaryKeysRegion() to access the region of keys and getDictionaryValuesRegion() to access the region of values.

      Parameters:
      keysToVisit - Iterator positioned at the first relevant row key belonging to this region. Will be advanced to after this region if true is returned. No guarantee is made if false is returned.
      Returns:
      A RegionVisitResult specifying FAILED if this region cannot supply a dictionary, CONTINUE if it can and keysToVisit is not exhausted, and COMPLETE if it can and keysToVisit is exhausted
    • gatherDictionaryValuesRowSet

      default boolean gatherDictionaryValuesRowSet(@NotNull RowSet.SearchIterator keysToVisit, @NotNull RowSequence.Iterator knownKeys, @NotNull @NotNull RowSetBuilderSequential sequentialBuilder)
      Optional method that should only be used on regions returned by getDictionaryValuesRegion(). Gathers row keys representing the dictionary values for this region, excluding those already known to the caller. This is used to support symbol table access.
      Parameters:
      keysToVisit - A search iterator over the enclosing table address space (which must have the same regions at the same masks), positioned at a row key in this region. Used to identify regions to visit. Should be advanced to after this region as a side-effect.
      knownKeys - An iterator over the previously-known row keys, positioned at the first known key in this region, or after the region's maximum key if no keys are known. Should be advanced to after this region as a side effect.
      sequentialBuilder - Output builder; implementations should append ranges for row keys not found in knownKeys
      Returns:
      Whether keysToVisit has been exhausted
      Throws:
      UnsupportedOperationException - If this region is incapable of gathering its dictionary values RowSet
    • getDictionaryKeysRegion

      default ColumnRegionLong<DictionaryKeys> getDictionaryKeysRegion()
      Returns:
      A dictionary keys region as specified by supportsDictionaryFormat(RowSet.SearchIterator)
      Throws:
      UnsupportedOperationException - If this region does not support dictionary format
      ImplNote:
      Implementations should cache the result
    • getDictionaryValuesRegion

      default ColumnRegionObject<DATA_TYPE,ATTR> getDictionaryValuesRegion()
      Returns:
      A dictionary values region as specified by supportsDictionaryFormat(RowSet.SearchIterator)
      Throws:
      UnsupportedOperationException - If this region does not support dictionary format
      ImplNote:
      Implementations should cache the result
    • getChunkType

      @FinalDefault default ChunkType getChunkType()
      Description copied from interface: ChunkSource
      Get the most suitable ChunkType for use with this ChunkSource.
      Specified by:
      getChunkType in interface ChunkSource<DATA_TYPE>
      Returns:
      The ChunkType
    • createNull

      static <DATA_TYPE, ATTR extends Any> ColumnRegionObject<DATA_TYPE,ATTR> createNull(long pageMask)
    • createConstantDictionaryKeysRegion

      static ColumnRegionLong<DictionaryKeys> createConstantDictionaryKeysRegion(long pageMask)