Class MatchFilter
java.lang.Object
io.deephaven.engine.table.impl.select.WhereFilterImpl
io.deephaven.engine.table.impl.select.MatchFilter
- All Implemented Interfaces:
Expression
,Filter
,DependencyStreamProvider
,WhereFilter
,Serializable
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static class
static class
static enum
Nested classes/interfaces inherited from interface io.deephaven.api.filter.Filter
Filter.Visitor<T>
Nested classes/interfaces inherited from interface io.deephaven.engine.table.impl.select.WhereFilter
WhereFilter.PreviousFilteringNotSupported, WhereFilter.RecomputeListener
-
Field Summary
Fields inherited from interface io.deephaven.engine.table.impl.select.WhereFilter
ZERO_LENGTH_WHERE_FILTER_ARRAY
-
Constructor Summary
ConstructorDescriptionMatchFilter
(@NotNull MatchFilter.CaseSensitivity sensitivity, @NotNull MatchFilter.MatchType matchType, @NotNull String columnName, @NotNull String... strValues) MatchFilter
(@NotNull MatchFilter.MatchType matchType, @NotNull String columnName, @NotNull Object... values) MatchFilter
(@NotNull String columnName, @NotNull Object... values) Deprecated, for removal: This API element is subject to removal in a future version.this method is non-obvious in using IgnoreCase by default.MatchFilter
(@Nullable CachingSupplier<ConditionFilter> failoverFilter, @NotNull MatchFilter.CaseSensitivity sensitivity, @NotNull MatchFilter.MatchType matchType, @NotNull String columnName, @NotNull String... strValues) -
Method Summary
Modifier and TypeMethodDescriptionbeginOperation
(@NotNull Table sourceTable) Perform any operation-level initialization necessary using theTable
that will be filtered with this WhereFilter, e.g.boolean
Can this filter operation be memoized?copy()
Create a copy of this WhereFilter.boolean
@NotNull WritableRowSet
Filter selection to only matching rows.@NotNull WritableRowSet
filterInverse
(@NotNull RowSet selection, @NotNull RowSet fullSet, @NotNull Table table, boolean usePrev) Filter selection to only non-matching rows.Get the array columns required by this select filter.Get the columns required by this select filter.Return a stream of dependencies for this object.boolean
Object[]
int
hashCode()
void
init
(@NotNull TableDefinition tableDefinition) Initialize this filter given the table definition.void
init
(@NotNull TableDefinition tableDefinition, @NotNull QueryCompilerRequestProcessor compilationProcessor) Initialize this select filter given the table definitionboolean
renameFilter
(Map<String, String> renames) void
Set theWhereFilter.RecomputeListener
that should be notified if results based on this WhereFilter must be recomputed.toString()
Methods inherited from class io.deephaven.engine.table.impl.select.WhereFilterImpl
isAutomatedFilter, setAutomatedFilter
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.deephaven.engine.table.impl.select.WhereFilter
filter, invert, isRefreshing, permitParallelization, validateSafeForRefresh, walk, walk
-
Constructor Details
-
MatchFilter
public MatchFilter(@NotNull @NotNull MatchFilter.MatchType matchType, @NotNull @NotNull String columnName, @NotNull @NotNull Object... values) -
MatchFilter
@Deprecated(forRemoval=true) public MatchFilter(@NotNull @NotNull String columnName, @NotNull @NotNull Object... values) Deprecated, for removal: This API element is subject to removal in a future version.this method is non-obvious in using IgnoreCase by default. UseMatchFilter(MatchType, String, Object...)
instead. -
MatchFilter
public MatchFilter(@NotNull @NotNull MatchFilter.CaseSensitivity sensitivity, @NotNull @NotNull MatchFilter.MatchType matchType, @NotNull @NotNull String columnName, @NotNull @NotNull String... strValues) -
MatchFilter
public MatchFilter(@Nullable @Nullable CachingSupplier<ConditionFilter> failoverFilter, @NotNull @NotNull MatchFilter.CaseSensitivity sensitivity, @NotNull @NotNull MatchFilter.MatchType matchType, @NotNull @NotNull String columnName, @NotNull @NotNull String... strValues)
-
-
Method Details
-
renameFilter
-
getValues
-
getInvertMatch
public boolean getInvertMatch() -
getMatchType
-
getColumns
Description copied from interface:WhereFilter
Get the columns required by this select filter.This filter must already be initialized before calling this method.
- Specified by:
getColumns
in interfaceWhereFilter
- Returns:
- the columns used as input by this select filter.
-
getColumnArrays
Description copied from interface:WhereFilter
Get the array columns required by this select filter.This filter must already be initialized before calling this method.
- Specified by:
getColumnArrays
in interfaceWhereFilter
- Returns:
- the columns used as array input by this select filter.
-
init
Description copied from interface:WhereFilter
Initialize this filter given the table definition. If this filter has already been initialized, this should be a no-op, or optionally validate that the table definition is compatible with previous initialization.- Specified by:
init
in interfaceWhereFilter
- Parameters:
tableDefinition
- the definition of the table that will be filtered
-
init
public void init(@NotNull @NotNull TableDefinition tableDefinition, @NotNull @NotNull QueryCompilerRequestProcessor compilationProcessor) Description copied from interface:WhereFilter
Initialize this select filter given the table definition- Specified by:
init
in interfaceWhereFilter
- Parameters:
tableDefinition
- the definition of the table that will be filteredcompilationProcessor
- the processor to use for compilation
-
beginOperation
Description copied from interface:WhereFilter
Perform any operation-level initialization necessary using theTable
that will be filtered with this WhereFilter, e.g. gatheringdata indexes
. This method will always be called exactly once, before gathering any dependencies or filtering data.- Specified by:
beginOperation
in interfaceWhereFilter
- Parameters:
sourceTable
- TheTable
that will be filtered with this WhereFilter- Returns:
- A
SafeCloseable
that will beclosed
when the operation is complete, whether successful or not
-
getDependencyStream
Description copied from interface:DependencyStreamProvider
Return a stream of dependencies for this object.- Specified by:
getDependencyStream
in interfaceDependencyStreamProvider
-
filter
@NotNull public @NotNull WritableRowSet filter(@NotNull @NotNull RowSet selection, @NotNull @NotNull RowSet fullSet, @NotNull @NotNull Table table, boolean usePrev) Description copied from interface:WhereFilter
Filter selection to only matching rows.- Specified by:
filter
in interfaceWhereFilter
- Parameters:
selection
- the indices that should be filtered. The selection must be a subset of fullSet, and may include rows that the engine determines need not be evaluated to produce the result. Implementations may not mutate orclose
selection
.fullSet
- the complete RowSet of the table to filter. The fullSet is used for calculating variables like "i" or "ii". Implementations may not mutate orclose
fullSet
.table
- the table to filterusePrev
- true if previous values should be used. Implementing previous value filtering is optional, and aWhereFilter.PreviousFilteringNotSupported
exception may be thrown. If a PreviousFiltering exception is thrown, then the caller must acquire the PeriodicUpdateGraph lock.- Returns:
- The subset of selection accepted by this filter; ownership passes to the caller
-
filterInverse
@NotNull public @NotNull WritableRowSet filterInverse(@NotNull @NotNull RowSet selection, @NotNull @NotNull RowSet fullSet, @NotNull @NotNull Table table, boolean usePrev) Description copied from interface:WhereFilter
Filter selection to only non-matching rows.Defaults to
try (final WritableRowSet regular = filter(selection, fullSet, table, usePrev)) { return selection.minus(regular); }
Implementations are encouraged to override this when they can provide more efficient implementations.
- Specified by:
filterInverse
in interfaceWhereFilter
- Parameters:
selection
- the indices that should be filtered. The selection must be a subset of fullSet, and may include rows that the engine determines need not be evaluated to produce the result. Implementations may not mutate orclose
selection
.fullSet
- the complete RowSet of the table to filter. The fullSet is used for calculating variables like "i" or "ii". Implementations may not mutate orclose
fullSet
.table
- the table to filterusePrev
- true if previous values should be used. Implementing previous value filtering is optional, and aWhereFilter.PreviousFilteringNotSupported
exception may be thrown. If a PreviousFiltering exception is thrown, then the caller must acquire the PeriodicUpdateGraph lock.- Returns:
- The subset of selection not accepted by this filter; ownership passes to the caller
-
isSimpleFilter
public boolean isSimpleFilter()- Specified by:
isSimpleFilter
in interfaceWhereFilter
- Returns:
- true if this is a filter that does not require any code execution, but rather is handled entirely within the database engine.
-
setRecomputeListener
Description copied from interface:WhereFilter
Set theWhereFilter.RecomputeListener
that should be notified if results based on this WhereFilter must be recomputed.- Specified by:
setRecomputeListener
in interfaceWhereFilter
- Parameters:
listener
- TheWhereFilter.RecomputeListener
to notify
-
toString
-
equals
-
hashCode
public int hashCode() -
canMemoize
public boolean canMemoize()Description copied from interface:WhereFilter
Can this filter operation be memoized?- Specified by:
canMemoize
in interfaceWhereFilter
- Returns:
- if this filter can be memoized
-
copy
Description copied from interface:WhereFilter
Create a copy of this WhereFilter.- Specified by:
copy
in interfaceWhereFilter
- Returns:
- an independent copy of this WhereFilter.
-