Class UnionSourceManager

java.lang.Object
io.deephaven.engine.table.impl.sources.UnionSourceManager
All Implemented Interfaces:
PushdownFilterMatcher, PushdownPredicateManager

public class UnionSourceManager extends Object implements PushdownPredicateManager
  • Constructor Details

    • UnionSourceManager

      public UnionSourceManager(@NotNull @NotNull PartitionedTable partitionedTable)
  • Method Details

    • isUsingComponentsSafe

      public boolean isUsingComponentsSafe()
      Determine whether using the component tables directly in a subsequent merge will affect the correctness of that merge. This is true iff constituents cannot be changed.
      Returns:
      If using the component tables is allowed
    • getComponentTables

      public Collection<Table> getComponentTables()
    • getColumnSources

      public Map<String,UnionColumnSource<?>> getColumnSources()
    • getResult

      @NotNull public @NotNull QueryTable getResult()
    • estimatePushdownFilterCost

      public 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.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

      public 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
    • makePushdownFilterContext

      public UnionSourceManager.UnionSourcePushdownFilterContext makePushdownFilterContext(WhereFilter filter, List<ColumnSource<?>> filterSources)
      Description copied from interface: PushdownFilterMatcher
      Create a pushdown filter context for this entity.
      Specified by:
      makePushdownFilterContext in interface PushdownFilterMatcher
      Parameters:
      filter - the filter to use while making the context
      filterSources - the column sources that match the filter column names
      Returns:
      the created filter context