Class UnionSourceManager
java.lang.Object
io.deephaven.engine.table.impl.sources.UnionSourceManager
- All Implemented Interfaces:
PushdownFilterMatcher
,PushdownPredicateManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
estimatePushdownFilterCost
(WhereFilter filter, RowSet selection, boolean usePrev, PushdownFilterContext context, JobScheduler jobScheduler, LongConsumer onComplete, Consumer<Exception> onError) Estimate the cost of pushing down the next pushdown filter.@NotNull QueryTable
boolean
Determine whether using the component tables directly in a subsequent merge will affect the correctness of that merge.makePushdownFilterContext
(WhereFilter filter, List<ColumnSource<?>> filterSources) Create a pushdown filter context for this entity.void
pushdownFilter
(WhereFilter filter, RowSet selection, boolean usePrev, PushdownFilterContext context, long costCeiling, JobScheduler jobScheduler, Consumer<PushdownResult> onComplete, Consumer<Exception> onError) Push down the given filter to the underlying table and pass the result to the consumer.
-
Constructor Details
-
UnionSourceManager
-
-
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 istrue
iff constituents cannot be changed.- Returns:
- If using the component tables is allowed
-
getComponentTables
-
getColumnSources
-
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 inPushdownResult
(such asPushdownResult.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 interfacePushdownFilterMatcher
- Parameters:
filter
- Thefilter
to test.selection
- The set of rows to tests.usePrev
- Whether to use the previous resultcontext
- ThePushdownFilterContext
to use for the pushdown operation.jobScheduler
- The job scheduler to use for scheduling child jobsonComplete
- 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 thanPushdownFilterContext.executedFilterCost()
and less than or equal tocostCeiling
.The resulting
PushdownResult
(toonComplete
) must only contain rows fromselection
. Thematch row set
are rows that are guaranteed to match. The implicitly "missing" rowsselection - match - maybeMatch
are rows that are guaranteed to not match. The remainingmaybe match row set
are rows that may, or may not, match. The pushdown result ownership passes toonComplete
.A no-op implementation should simply complete with
PushdownResult.maybeMatch(selection)
.- Specified by:
pushdownFilter
in interfacePushdownFilterMatcher
- Parameters:
filter
- Thefilter
to apply.selection
- The set of rows to test.usePrev
- Whether to use the previous resultcontext
- ThePushdownFilterContext
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 jobsonComplete
- Consumer of the output rowsets for added and modified rows that pass the filteronError
- 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 interfacePushdownFilterMatcher
- Parameters:
filter
- the filter to use while making the contextfilterSources
- the column sources that match the filter column names- Returns:
- the created filter context
-