Package io.deephaven.engine.table.impl
Class PushdownResult
java.lang.Object
io.deephaven.engine.table.impl.PushdownResult
- All Implemented Interfaces:
SafeCloseable,AutoCloseable
Records the results of a push-down predicate filter operation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longColumn-level Bloom filter needs to be usedstatic final longRequires reading and querying an external index tablestatic final longRequires reading a dictionary to determine matchesstatic final longRequires querying an in-memory index structurestatic final longOnly table/row-group statistics are checked, assuming the metadata is already loadedstatic final longThe entire column contains a single value, so a single read is sufficient to determine matches.static final longRequires using binary search on sorted data -
Method Summary
Modifier and TypeMethodDescriptionstatic PushdownResultConstructs a new result with all ofselectionasmatch.static PushdownResultallMaybeMatch(@NotNull RowSet selection) Constructs a new result with all ofselectionasmaybeMatch.static PushdownResultallNoMatch(@NotNull RowSet selection) Constructs a new result with nomatchnormaybeMatchrows.voidclose()Closesmatch()andmaybeMatch().copy()Creates a copy ofthis.match()Rows that are known to match.Rows that may match.static PushdownResultConstructs a new result withselection,match, andmaybeMatch.
-
Field Details
-
SINGLE_VALUE_COLUMN_COST
public static final long SINGLE_VALUE_COLUMN_COSTThe entire column contains a single value, so a single read is sufficient to determine matches.- See Also:
-
METADATA_STATS_COST
public static final long METADATA_STATS_COSTOnly table/row-group statistics are checked, assuming the metadata is already loaded- See Also:
-
BLOOM_FILTER_COST
public static final long BLOOM_FILTER_COSTColumn-level Bloom filter needs to be used- See Also:
-
IN_MEMORY_DATA_INDEX_COST
public static final long IN_MEMORY_DATA_INDEX_COSTRequires querying an in-memory index structure- See Also:
-
DICTIONARY_DATA_COST
public static final long DICTIONARY_DATA_COSTRequires reading a dictionary to determine matches- See Also:
-
SORTED_DATA_COST
public static final long SORTED_DATA_COSTRequires using binary search on sorted data- See Also:
-
DEFERRED_DATA_INDEX_COST
public static final long DEFERRED_DATA_INDEX_COSTRequires reading and querying an external index table- See Also:
-
-
Method Details
-
allMaybeMatch
Constructs a new result with all ofselectionasmaybeMatch. Semantically equivalent toof(selection, RowSetFactory.empty(), selection), but this method is preferred over that case as no preconditions need to be checked.selectionmust be theselectionfromPushdownFilterMatcher.pushdownFilter(WhereFilter, RowSet, boolean, PushdownFilterContext, long, JobScheduler, Consumer, Consumer).- Parameters:
selection- the selection assigned tomaybeMatch- Returns:
- the result
- See Also:
-
allMatch
Constructs a new result with all ofselectionasmatch. Semantically equivalent toof(selection, selection, RowSetFactory.empty()), but this method is preferred over that case as no preconditions need to be checked.selectionmust be theselectionfromPushdownFilterMatcher.pushdownFilter(WhereFilter, RowSet, boolean, PushdownFilterContext, long, JobScheduler, Consumer, Consumer).- Parameters:
selection- the selection assigned tomatch- Returns:
- the result
- See Also:
-
allNoMatch
Constructs a new result with nomatchnormaybeMatchrows. Semantically equivalent toof(selection, RowSetFactory.empty(), RowSetFactory.empty()), but this method is preferred over that case as no preconditions need to be checked.selectionmust be theselectionfromPushdownFilterMatcher.pushdownFilter(WhereFilter, RowSet, boolean, PushdownFilterContext, long, JobScheduler, Consumer, Consumer).- Parameters:
selection- the selection (representing the full "no match" case)- Returns:
- the result
- See Also:
-
of
public static PushdownResult of(@NotNull @NotNull RowSet selection, @NotNull @NotNull RowSet match, @NotNull @NotNull RowSet maybeMatch) Constructs a new result withselection,match, andmaybeMatch.matchandmaybeMatchmust be non-overlapping subsets ofselection, but this may not be thoroughly checked.selectionmust be theselectionfromPushdownFilterMatcher.pushdownFilter(WhereFilter, RowSet, boolean, PushdownFilterContext, long, JobScheduler, Consumer, Consumer).- Parameters:
selection- the selectionmatch- rows that matchmaybeMatch- rows that might match- Returns:
- the result
-
match
Rows that are known to match. Is asubset oftheselectionfromPushdownFilterMatcher.pushdownFilter(WhereFilter, RowSet, boolean, PushdownFilterContext, long, JobScheduler, Consumer, Consumer). Does notoverlapwithmaybeMatchnornoMatch. Ownership does not transfer to the caller. -
maybeMatch
Rows that may match. Is asubset oftheselectionfromPushdownFilterMatcher.pushdownFilter(WhereFilter, RowSet, boolean, PushdownFilterContext, long, JobScheduler, Consumer, Consumer). Does notoverlapwithmatchnornoMatch. Ownership does not transfer to the caller. -
copy
Creates a copy ofthis.- Returns:
- the copy
-
close
public void close()Closesmatch()andmaybeMatch().- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSafeCloseable
-