Class AbstractConditionFilter
java.lang.Object
io.deephaven.engine.table.impl.select.WhereFilterImpl
io.deephaven.engine.table.impl.select.AbstractConditionFilter
- All Implemented Interfaces:
Expression
,Filter
,WhereFilter
,Serializable
- Direct Known Subclasses:
ConditionFilter
- See Also:
-
Nested Class Summary
Nested ClassesNested 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
FieldsModifier and TypeFieldDescriptionprotected final @NotNull String
protected boolean
protected QueryScopeParam<?>[]
Fields inherited from interface io.deephaven.engine.table.impl.select.WhereFilter
ZERO_LENGTH_WHERE_FILTER_ARRAY
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractConditionFilter
(@NotNull String formula, boolean unboxArguments) protected
AbstractConditionFilter
(@NotNull String formula, Map<String, String> renames, boolean unboxArguments) -
Method Summary
Modifier and TypeMethodDescriptionabstract AbstractConditionFilter
copy()
Create a copy of this WhereFilter.@NotNull WritableRowSet
Filter selection to only matching rows.protected abstract void
generateFilterCode
(@NotNull TableDefinition tableDefinition, @NotNull TimeLiteralReplacedExpression timeConversionResult, QueryLanguageParser.Result result, @NotNull QueryCompilerRequestProcessor compilationProcessor) Get the array columns required by this select filter.Get the columns required by this select filter.protected abstract AbstractConditionFilter.Filter
boolean
boolean
Returns true if this filter uses row virtual offset columns ofi
,ii
ork
.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
protected void
abstract AbstractConditionFilter
renameFilter
(Map<String, String> renames) protected abstract void
When numba vectorized functions are used to evaluate query filters, we need to create a special ChunkFilter that can handle packing and unpacking arrays required/returned by the vectorized function, essentially bypassing the regular code generation process which isn't able to support such use cases without needing some major rework.void
Set theWhereFilter.RecomputeListener
that should be notified if results based on this WhereFilter must be recomputed.toString()
void
validateSafeForRefresh
(BaseTable<?> sourceTable) Validate that thisWhereFilter
is safe to use in the context of the provided sourceTable.Methods inherited from class io.deephaven.engine.table.impl.select.WhereFilterImpl
isAutomatedFilter, setAutomatedFilter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.deephaven.engine.table.impl.select.WhereFilter
beginOperation, canMemoize, filter, filterInverse, invert, isRefreshing, permitParallelization, walk, walk
-
Field Details
-
formula
-
params
-
initialized
protected boolean initialized
-
-
Constructor Details
-
AbstractConditionFilter
-
AbstractConditionFilter
-
-
Method Details
-
getColumns
Description copied from interface:WhereFilter
Get the columns required by this select filter.This filter must already be initialized before calling this method.
- 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.
- 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.- 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- Parameters:
tableDefinition
- the definition of the table that will be filteredcompilationProcessor
- the processor to use for compilation
-
validateSafeForRefresh
Description copied from interface:WhereFilter
Validate that thisWhereFilter
is safe to use in the context of the provided sourceTable.- Parameters:
sourceTable
- the source table
-
generateFilterCode
protected abstract void generateFilterCode(@NotNull @NotNull TableDefinition tableDefinition, @NotNull @NotNull TimeLiteralReplacedExpression timeConversionResult, @NotNull QueryLanguageParser.Result result, @NotNull @NotNull QueryCompilerRequestProcessor compilationProcessor) throws MalformedURLException, ClassNotFoundException -
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.- 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
-
getFilter
protected abstract AbstractConditionFilter.Filter getFilter(Table table, RowSet fullSet) throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException -
setFilter
When numba vectorized functions are used to evaluate query filters, we need to create a special ChunkFilter that can handle packing and unpacking arrays required/returned by the vectorized function, essentially bypassing the regular code generation process which isn't able to support such use cases without needing some major rework.- Parameters:
filter
- the filter to set
-
setRecomputeListener
Description copied from interface:WhereFilter
Set theWhereFilter.RecomputeListener
that should be notified if results based on this WhereFilter must be recomputed.- Parameters:
listener
- TheWhereFilter.RecomputeListener
to notify
-
copy
Description copied from interface:WhereFilter
Create a copy of this WhereFilter.- Returns:
- an independent copy of this WhereFilter.
-
onCopy
-
toString
-
isSimpleFilter
public boolean isSimpleFilter()- Returns:
- true if this is a filter that does not require any code execution, but rather is handled entirely within the database engine.
-
hasConstantArrayAccess
public boolean hasConstantArrayAccess()- Returns:
- true if the formula expression of the filter has Array Access that conforms to "i +/- <constant>" or "ii +/- <constant>".
-
hasVirtualRowVariables
public boolean hasVirtualRowVariables()Description copied from interface:WhereFilter
Returns true if this filter uses row virtual offset columns ofi
,ii
ork
. -
getFormulaShiftColPair
- Returns:
- a Pair object, consisting of formula string and shift to column MatchPairs, if the filter formula or expression has Array Access that conforms to "i +/- <constant>" or "ii +/- <constant>". If there is a parsing error for the expression null is returned.
-
renameFilter
-