Interface ColumnRegionObject<T,ATTR extends Attributes.Any>

All Superinterfaces:
ChunkSource<ATTR>, ColumnRegion<ATTR>, FillContextMaker, GetContextMaker, Page<ATTR>, PagingChunkSource<ATTR>, Releasable
All Known Implementing Classes:
ColumnRegionChunkDictionary, ColumnRegionObject.Null, ColumnRegionObjectCached, ColumnRegionObjectCodecFixed, ColumnRegionObjectCodecVariable, ColumnRegionObjectWithDictionary, ColumnRegionStringSet, DeephavenColumnRegionObjectBase, DeferredColumnRegionObject, ParquetColumnRegionObject, ParquetColumnRegionObject.StaticPageStore

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

    • getObject

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

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

      default RegionVisitResult supportsDictionaryFormat(@NotNull ReadOnlyIndex.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(Index.SearchIterator, Index.Iterator, Index.SequentialBuilder).

      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 ReadOnlyIndex.SearchIterator keysToVisit, @NotNull ReadOnlyIndex.Iterator knownKeys, @NotNull Index.SequentialBuilder sequentialBuilder)
      Optional method that should only be used on regions returned by getDictionaryValuesRegion(). Gathers
      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
    • getDictionaryRegionType

      default ChunkType getDictionaryRegionType()
    • getDictionaryKeysRegion

      default ColumnRegionLong<Attributes.DictionaryKeys> getDictionaryKeysRegion()
      Get a view of this region as long dictionary keys.
      Returns:
      A dictionary keys region as specified by supportsDictionaryFormat(Index.SearchIterator)
      Throws:
      UnsupportedOperationException - If this region does not support dictionary format
      ImplNote:
      Implementations should cache the result
    • getDictionaryKeysRegionInt

      default ColumnRegionInt<Attributes.DictionaryKeys> getDictionaryKeysRegionInt()
      Get a view of this region as int dictionary keys.
      Returns:
      A dictionary keys region as specified by supportsDictionaryFormat(Index.SearchIterator)
      Throws:
      UnsupportedOperationException - If this region does not support dictionary format
      ImplNote:
      Implementations should cache the result
    • getDictionaryValuesRegion

      default ColumnRegionObject<T,ATTR> getDictionaryValuesRegion()
      Get a view of this region as dictionary values.
      Returns:
      A dictionary values region as specified by supportsDictionaryFormat(Index.SearchIterator)
      Throws:
      UnsupportedOperationException - If this region does not support dictionary format
      ImplNote:
      Implementations should cache the result
    • skipCache

      default ColumnRegionObject<T,ATTR> skipCache()
      Get a version of this region that skips all internal value caching.
      Returns:
      a view of this region that ignores any value caching.
    • getNativeType

      Class<?> getNativeType()
      Specified by:
      getNativeType in interface ChunkSource<T>
    • createNull

      static <T, ATTR extends Attributes.Any> ColumnRegionObject.Null<T,ATTR> createNull()
    • createDictionaryKeysWrapper

      static ColumnRegionLong<Attributes.DictionaryKeys> createDictionaryKeysWrapper(int regionIndex, @NotNull ColumnRegionObject<?,?> sourceRegion)