Class WhereFilterDelegatingBase
- All Implemented Interfaces:
ConcurrencyControl<Filter>,Expression,Filter,LogOutputAppendable,LivenessManager,LivenessNode,LivenessReferent,DependencyStreamProvider,WhereFilter,WhereFilterDelegating,Serializable
- Direct Known Subclasses:
WhereFilterInvertedImpl,WhereFilterSerialImpl,WhereFilterWithDeclaredBarriersImpl,WhereFilterWithRespectedBarriersImpl
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.engine.table.impl.select.WhereFilter
WhereFilter.PreviousFilteringNotSupported, WhereFilter.RecomputeListener, WhereFilter.Visitor<T> -
Field Summary
FieldsFields inherited from class io.deephaven.engine.table.impl.select.WhereFilterLivenessArtifactImpl
updateGraphFields inherited from interface io.deephaven.engine.table.impl.select.WhereFilter
ZERO_LENGTH_WHERE_FILTER_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbeginOperation(@NotNull Table sourceTable) Perform any operation-level initialization necessary using theTablethat will be filtered with this WhereFilter, e.g.booleanCan this filter operation be memoized?boolean@NotNull WritableRowSetFilter selection to only matching rows.@NotNull WritableRowSetfilterInverse(@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.Returns the filter to which this filter delegates.inthashCode()voidinit(@NotNull TableDefinition tableDefinition) Initialize this filter given the table definition.voidinit(@NotNull TableDefinition tableDefinition, @NotNull QueryCompilerRequestProcessor compilationProcessor) Initialize this select filter given the table definitionbooleanThe database system may automatically generate a filter, for example, when applying an ACL to a table.booleanIs this filter refreshing?booleanisSerial()Return true if this filter is aserialfilter.booleanbooleanReturns true if this filter permits parallelism.voidsetAutomatedFilter(boolean value) The database system may automatically generate a filter, for example, when applying an ACL to a table.voidSet theWhereFilter.RecomputeListenerthat should be notified if results based on this WhereFilter must be recomputed.voidvalidateSafeForRefresh(BaseTable<?> sourceTable) Validate that thisWhereFilteris safe to use in the context of the provided sourceTable.Methods inherited from class io.deephaven.engine.liveness.LivenessArtifact
manageWithCurrentScopeMethods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessNode
ensureCleanupOnGC, findAnyManagedReferent, forEachManagedReference, getWeakReference, initializeTransientFieldsForLiveness, onReferenceCountAtZero, tryManage, tryUnmanage, tryUnmanageMethods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessReferent
destroy, dropReference, tryRetainReferenceMethods inherited from class io.deephaven.util.referencecounting.ReferenceCounted
append, decrementReferenceCount, forceReferenceCountToZero, getReferenceCountDebug, incrementReferenceCount, resetReferenceCount, toString, tryDecrementReferenceCount, tryIncrementReferenceCountMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.deephaven.engine.liveness.LivenessManager
manage, unmanage, unmanageMethods inherited from interface io.deephaven.engine.liveness.LivenessReferent
dropReference, getReferentDescription, retainReference, tryRetainReferenceMethods inherited from interface io.deephaven.engine.table.impl.select.WhereFilter
copy, filter, hasVirtualRowVariables, invert, walk, walk, walk, withDeclaredBarriers, withRespectedBarriers, withSerialMethods inherited from interface io.deephaven.engine.table.impl.select.WhereFilterDelegating
maybeUnwrapFilter
-
Field Details
-
filter
-
-
Constructor Details
-
WhereFilterDelegatingBase
-
-
Method Details
-
getDependencyStream
Description copied from interface:DependencyStreamProviderReturn a stream of dependencies for this object.- Specified by:
getDependencyStreamin interfaceDependencyStreamProvider
-
getWrappedFilter
Description copied from interface:WhereFilterDelegatingReturns the filter to which this filter delegates.- Specified by:
getWrappedFilterin interfaceWhereFilterDelegating
-
getColumns
Description copied from interface:WhereFilterGet the columns required by this select filter.This filter must already be initialized before calling this method.
- Specified by:
getColumnsin interfaceWhereFilter- Returns:
- the columns used as input by this select filter.
-
getColumnArrays
Description copied from interface:WhereFilterGet the array columns required by this select filter.This filter must already be initialized before calling this method.
- Specified by:
getColumnArraysin interfaceWhereFilter- Returns:
- the columns used as array input by this select filter.
-
init
Description copied from interface:WhereFilterInitialize 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:
initin 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:WhereFilterInitialize this select filter given the table definition- Specified by:
initin interfaceWhereFilter- Parameters:
tableDefinition- the definition of the table that will be filteredcompilationProcessor- the processor to use for compilation
-
beginOperation
Description copied from interface:WhereFilterPerform any operation-level initialization necessary using theTablethat 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:
beginOperationin interfaceWhereFilter- Parameters:
sourceTable- TheTablethat will be filtered with this WhereFilter- Returns:
- A
SafeCloseablethat will beclosedwhen the operation is complete, whether successful or not
-
validateSafeForRefresh
Description copied from interface:WhereFilterValidate that thisWhereFilteris safe to use in the context of the provided sourceTable.- Specified by:
validateSafeForRefreshin interfaceWhereFilter- Parameters:
sourceTable- the source table
-
filter
@NotNull public @NotNull WritableRowSet filter(@NotNull @NotNull RowSet selection, @NotNull @NotNull RowSet fullSet, @NotNull @NotNull Table table, boolean usePrev) Description copied from interface:WhereFilterFilter selection to only matching rows.- Specified by:
filterin 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 orcloseselection.fullSet- the complete RowSet of the table to filter. The fullSet is used for calculating variables like "i" or "ii". Implementations may not mutate orclosefullSet.table- the table to filterusePrev- true if previous values should be used. Implementing previous value filtering is optional, and aWhereFilter.PreviousFilteringNotSupportedexception 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:WhereFilterFilter 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:
filterInversein 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 orcloseselection.fullSet- the complete RowSet of the table to filter. The fullSet is used for calculating variables like "i" or "ii". Implementations may not mutate orclosefullSet.table- the table to filterusePrev- true if previous values should be used. Implementing previous value filtering is optional, and aWhereFilter.PreviousFilteringNotSupportedexception 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:
isSimpleFilterin interfaceWhereFilter- Returns:
- true if this is a filter that does not require any code execution, but rather is handled entirely within the database engine.
-
isRefreshing
public boolean isRefreshing()Description copied from interface:WhereFilterIs this filter refreshing?- Specified by:
isRefreshingin interfaceWhereFilter- Returns:
- if this filter is refreshing
-
setRecomputeListener
Description copied from interface:WhereFilterSet theWhereFilter.RecomputeListenerthat should be notified if results based on this WhereFilter must be recomputed.- Specified by:
setRecomputeListenerin interfaceWhereFilter- Parameters:
result- TheWhereFilter.RecomputeListenerto notify
-
isAutomatedFilter
public boolean isAutomatedFilter()Description copied from interface:WhereFilterThe database system may automatically generate a filter, for example, when applying an ACL to a table. There are certain operations which may bypass these filters.This function returns whether this filter is automated.
- Specified by:
isAutomatedFilterin interfaceWhereFilter- Overrides:
isAutomatedFilterin classWhereFilterLivenessArtifactImpl- Returns:
- true if this filter was automatically applied by the database system. False otherwise.
-
setAutomatedFilter
public void setAutomatedFilter(boolean value) Description copied from interface:WhereFilterThe database system may automatically generate a filter, for example, when applying an ACL to a table. There are certain operations which may bypass these filters.This function indicates that this filter is automated.
- Specified by:
setAutomatedFilterin interfaceWhereFilter- Overrides:
setAutomatedFilterin classWhereFilterLivenessArtifactImpl- Parameters:
value- true if this filter was automatically applied by the database system. False otherwise.
-
canMemoize
public boolean canMemoize()Description copied from interface:WhereFilterCan this filter operation be memoized?- Specified by:
canMemoizein interfaceWhereFilter- Returns:
- if this filter can be memoized
-
permitParallelization
public boolean permitParallelization()Description copied from interface:WhereFilterReturns true if this filter permits parallelism.No serial filters permit parallelization. A filter may not permit parallelism if the internal implementation does not support multiple
WhereFilter.filter(RowSet, RowSet, Table, boolean)calls (e.g., some special filters that operate only on a rowset or have external state).ConditionFilters automatically determine whether they permit parallelization based on whether filters arestateless by default.- Specified by:
permitParallelizationin interfaceWhereFilter- Returns:
- if this filter can be applied in parallel
-
isSerial
public boolean isSerial()Description copied from interface:WhereFilterReturn true if this filter is aserialfilter.A filter only returns true if the user explicitly marked the filter (or a filter that it wraps) as serial. A serial filter must not permit parallelism (as being executed in parallel would violate the contract of a serial filter).
- Specified by:
isSerialin interfaceWhereFilter- Returns:
- true if this filter is a serial filter.
-
equals
-
hashCode
public int hashCode()
-