Interface ColumnRegion<ATTR extends Any>

All Superinterfaces:
ChunkSource<ATTR>, DefaultChunkSource<ATTR>, FillContextMaker, GetContextMaker, Page<ATTR>, PagingChunkSource<ATTR>, PushdownFilterMatcher, RegionedPushdownFilterMatcher, Releasable
All Known Subinterfaces:
ColumnRegionByte<ATTR>, ColumnRegionChar<ATTR>, ColumnRegionDouble<ATTR>, ColumnRegionFloat<ATTR>, ColumnRegionInt<ATTR>, ColumnRegionLong<ATTR>, ColumnRegionObject<DATA_TYPE,ATTR>, ColumnRegionObject.SelfDictionaryRegion<DATA_TYPE,ATTR>, ColumnRegionReferencing<ATTR,REFERENCED_COLUMN_REGION>, ColumnRegionShort<ATTR>
All Known Implementing Classes:
AppendOnlyFixedSizePageRegionByte, AppendOnlyFixedSizePageRegionChar, AppendOnlyFixedSizePageRegionDouble, AppendOnlyFixedSizePageRegionFloat, AppendOnlyFixedSizePageRegionInt, AppendOnlyFixedSizePageRegionLong, AppendOnlyFixedSizePageRegionObject, AppendOnlyFixedSizePageRegionShort, ColumnRegion.Null, ColumnRegionByte.Constant, ColumnRegionByte.Null, ColumnRegionByte.StaticPageStore, ColumnRegionChar.Constant, ColumnRegionChar.Null, ColumnRegionChar.StaticPageStore, ColumnRegionChunkDictionary, ColumnRegionDouble.Constant, ColumnRegionDouble.Null, ColumnRegionDouble.StaticPageStore, ColumnRegionFloat.Constant, ColumnRegionFloat.Null, ColumnRegionFloat.StaticPageStore, ColumnRegionInt.Constant, ColumnRegionInt.Null, ColumnRegionInt.StaticPageStore, ColumnRegionLong.Constant, ColumnRegionLong.Null, ColumnRegionLong.StaticPageStore, ColumnRegionObject.Constant, ColumnRegionObject.DictionaryKeysWrapper, ColumnRegionObject.Null, ColumnRegionObject.StaticPageStore, ColumnRegionReferencing.Null, ColumnRegionReferencingImpl, ColumnRegionShort.Constant, ColumnRegionShort.Null, ColumnRegionShort.StaticPageStore, DeferredColumnRegionBase, DeferredColumnRegionChar, DeferredColumnRegionDouble, DeferredColumnRegionFloat, DeferredColumnRegionInt, DeferredColumnRegionLong, DeferredColumnRegionObject, DeferredColumnRegionReferencing, DeferredColumnRegionShort, GenericColumnRegionBase, ParquetColumnRegionBase, ParquetColumnRegionByte, ParquetColumnRegionChar, ParquetColumnRegionDouble, ParquetColumnRegionFloat, ParquetColumnRegionInt, ParquetColumnRegionLong, ParquetColumnRegionObject, ParquetColumnRegionShort

public interface ColumnRegion<ATTR extends Any> extends Page<ATTR>, Releasable, RegionedPushdownFilterMatcher
  • Method Details

    • firstRowOffset

      @FinalDefault default long firstRowOffset()
      Specified by:
      firstRowOffset in interface Page<ATTR extends Any>
      Returns:
      the first row of this page, after applying the PagingChunkSource.mask(), which refers to the first row of this page.
    • getColumnLocation

      default Optional<ColumnLocation> getColumnLocation()
    • invalidate

      void invalidate()
      Invalidate the region -- any further reads that cannot be completed consistently and correctly will fail.
    • estimatePushdownFilterCost

      default void estimatePushdownFilterCost(WhereFilter filter, RowSet selection, boolean usePrev, PushdownFilterContext context, JobScheduler jobScheduler, LongConsumer onComplete, Consumer<Exception> onError)
      Description copied from interface: PushdownFilterMatcher
      Estimate the cost of pushing down the next pushdown filter. This returns a unitless value to compare the cost of executing different filters. Common costs are listed in PushdownResult (such as PushdownResult.REGION_METADATA_STATS_COST) and should be used as a baseline for estimating the cost of newly implemented pushdown operations.

      A no-op implementation should simply complete with Long.MAX_VALUE.

      Specified by:
      estimatePushdownFilterCost in interface PushdownFilterMatcher
      Parameters:
      filter - The filter to test.
      selection - The set of rows to tests.
      usePrev - Whether to use the previous result
      context - The PushdownFilterContext to use for the pushdown operation.
      jobScheduler - The job scheduler to use for scheduling child jobs
      onComplete - Consumer of the estimated cost of the pushdown operation. 9223372036854775807L indicates that the filter cannot be pushed down.
      onError - Consumer of any exceptions that occur during the estimate operation
    • pushdownFilter

      default void pushdownFilter(WhereFilter filter, RowSet selection, boolean usePrev, PushdownFilterContext context, long costCeiling, JobScheduler jobScheduler, Consumer<PushdownResult> onComplete, Consumer<Exception> onError)
      Description copied from interface: PushdownFilterMatcher
      Push down the given filter to the underlying table and pass the result to the consumer. This method is expected to execute all pushdown filter steps that are greater than PushdownFilterContext.executedFilterCost() and less than or equal to costCeiling.

      The resulting PushdownResult (to onComplete) must only contain rows from selection. The match row set are rows that are guaranteed to match. The implicitly "missing" rows selection - match - maybeMatch are rows that are guaranteed to not match. The remaining maybe match row set are rows that may, or may not, match. The pushdown result ownership passes to onComplete.

      A no-op implementation should simply complete with PushdownResult.maybeMatch(selection).

      Specified by:
      pushdownFilter in interface PushdownFilterMatcher
      Parameters:
      filter - The filter to apply.
      selection - The set of rows to test.
      usePrev - Whether to use the previous result
      context - The PushdownFilterContext to use for the pushdown operation.
      costCeiling - Execute all possible filters with a cost less than or equal this value.
      jobScheduler - The job scheduler to use for scheduling child jobs
      onComplete - Consumer of the output rowsets for added and modified rows that pass the filter
      onError - Consumer of any exceptions that occur during the pushdown operation