Interface Filter
- All Superinterfaces:
ConcurrencyControl<Filter>,Expression
- All Known Subinterfaces:
LiteralFilter,ReindexingFilter,WhereFilter
- All Known Implementing Classes:
AbstractConditionFilter,AbstractRangeFilter,AutoTuningIncrementalReleaseFilter,BaseIncrementalReleaseFilter,ByteRangeFilter,CharRangeFilter,ClockFilter,ComparableRangeFilter,ComposedFilter,ConditionFilter,ConjunctiveFilter,DisjunctiveFilter,DoubleRangeFilter,DownsampledWhereFilter,DynamicWhereFilter,FilterAnd,FilterBase,FilterComparison,FilterIn,FilterIsNaN,FilterIsNull,FilterNot,FilterOr,FilterPattern,FilterSerial,FilterWithDeclaredBarriers,FilterWithRespectedBarriers,FloatRangeFilter,Function,IncrementalReleaseFilter,InstantRangeFilter,IntRangeFilter,LongRangeFilter,MatchFilter,Method,RangeFilter,RawString,RollingReleaseFilter,ShortRangeFilter,SingleSidedComparableRangeFilter,SortedClockFilter,TimeSeriesFilter,UnsortedClockFilter,VectorComponentFilterWrapper,WhereAllFilter,WhereFilterDelegatingBase,WhereFilterImpl,WhereFilterInvertedImpl,WhereFilterLivenessArtifactImpl,WhereFilterSerialImpl,WhereFilterWithDeclaredBarriersImpl,WhereFilterWithRespectedBarriersImpl,WhereNoneFilter
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic FilterCreates a filter that evaluates totruewhen all of thefiltersevaluate totrue, andfalsewhen any of thefiltersevaluates tofalse.static Filterand(Collection<? extends Filter> filters) Creates a filter that evaluates totruewhen all of thefiltersevaluate totrue, andfalsewhen any of thefiltersevaluates tofalse.static FilterWithDeclaredBarriersdeclaredBarriers(Filter filter, Object... barriers) Wraps the given filter with a FilterBarrier to declare one or more barriers that other filters can respect.static Collection<Filter> extractAnds(Filter filter) Performs a non-recursive "and-extraction" againstfilter.static Collection<? extends Filter> static Collection<? extends Filter> from(Collection<String> expressions) invert()The logical inversion ofthis.static FilterComparisonisFalse(Expression expression) Creates an is-false-filter.static FilterIsNaNisNaN(Expression expression) Creates an is-nan-filter.static FilterNot<FilterIsNaN> isNotNaN(Expression expression) Creates an is-not-nan-filter.static FilterNot<FilterIsNull> isNotNull(Expression expression) Creates an is-not-null-filter.static FilterIsNullisNull(Expression expression) Creates an is-null-filter.static FilterComparisonisTrue(Expression expression) Creates an is-true-filter.not(F filter) Creates anot-filterfromfilter.static LiteralFilterofFalse()Creates an always-false-filter.static LiteralFilterofTrue()Creates an always-true-filter.static FilterCreates a filter that evaluates totruewhen any offiltersevaluates totrue, andfalsewhen none of thefiltersevaluates totrue.static Filteror(Collection<? extends Filter> filters) Creates a filter that evaluates totruewhen any offiltersevaluates totrue, andfalsewhen none of thefiltersevaluates totrue.static FilterWithRespectedBarriersrespectedBarrier(Filter filter, Object... respectedBarriers) Wraps the given filter with a FilterBarrier to declare a barrier that other filters can respect.static FilterWraps the given filter with a FilterSerial to enforce serial execution.<T> Twalk(Filter.Visitor<T> visitor) default FilterwithDeclaredBarriers(Object... declaredBarriers) Designates the filter/selectable as declaring the specified barrier object(s).default FilterwithRespectedBarriers(Object... respectedBarriers) Specifies that the filter/selectable should respect the ordering constraints of the given barriers.default FilterApplies serial concurrency control to the expression.Methods inherited from interface io.deephaven.api.expression.Expression
walk
-
Method Details
-
from
-
from
-
ofTrue
Creates an always-true-filter.Equivalent to
Literal.of(true).- Returns:
- the always-true-filter
-
ofFalse
Creates an always-false-filter.Equivalent to
Literal.of(false).- Returns:
- the always-false-filter
-
isNull
Creates an is-null-filter.- Parameters:
expression- the expression- Returns:
- the is-null-filter
-
isNaN
Creates an is-nan-filter.- Parameters:
expression- the expression- Returns:
- the is-nan-filter
-
isNotNull
Creates an is-not-null-filter.Equivalent to
not(isNull(expression)).- Parameters:
expression- the expression- Returns:
- the is-not-null-filter
-
isNotNaN
Creates an is-not-nan-filter.Equivalent to
not(isNaN(expression)).- Parameters:
expression- the expression- Returns:
- the is-not-nan-filter
-
isTrue
Creates an is-true-filter.Equivalent to
FilterComparison.eq(expression, ofTrue()).- Parameters:
expression- the expression- Returns:
- the equals-true-filter
-
isFalse
Creates an is-false-filter.Equivalent to
FilterComparison.eq(expression, ofFalse()).- Parameters:
expression- the expression- Returns:
- @return the equals-false-filter
-
not
Creates anot-filterfromfilter. Callers should typically preferinvert(), unless the "not" context needs to be preserved.- Type Parameters:
F- the type of filter- Parameters:
filter- the filter- Returns:
- the not-filter
-
or
Creates a filter that evaluates totruewhen any offiltersevaluates totrue, andfalsewhen none of thefiltersevaluates totrue. This implies thatofFalse()is returned whenfiltersis empty.- Parameters:
filters- the filters- Returns:
- the filter
-
or
Creates a filter that evaluates totruewhen any offiltersevaluates totrue, andfalsewhen none of thefiltersevaluates totrue. This implies thatofFalse()is returned whenfiltersis empty.- Parameters:
filters- the filters- Returns:
- the filter
-
and
Creates a filter that evaluates totruewhen all of thefiltersevaluate totrue, andfalsewhen any of thefiltersevaluates tofalse. This implies thatofTrue()is returned whenfiltersis empty.- Parameters:
filters- the filters- Returns:
- the filter
-
and
Creates a filter that evaluates totruewhen all of thefiltersevaluate totrue, andfalsewhen any of thefiltersevaluates tofalse. This implies thatofTrue()is returned whenfiltersis empty.- Parameters:
filters- the filters- Returns:
- the filter
-
serial
Wraps the given filter with a FilterSerial to enforce serial execution.- Parameters:
filter- the filter to wrap- Returns:
- a FilterSerial instance wrapping the provided filter
-
declaredBarriers
Wraps the given filter with a FilterBarrier to declare one or more barriers that other filters can respect.- Parameters:
filter- the filter to wrapbarriers- the barrier objects being declared- Returns:
- a FilterBarrier instance wrapping the provided filter
-
respectedBarrier
Wraps the given filter with a FilterBarrier to declare a barrier that other filters can respect.- Parameters:
filter- the filter to wraprespectedBarriers- the barrier objects that need to be respected- Returns:
- a FilterBarrier instance wrapping the provided filter
-
extractAnds
Performs a non-recursive "and-extraction" againstfilter. Iffilteris aFilterAnd,FilterAnd.filters()will be returned. IffilterisofTrue(), an empty list will be returned. Otherwise, a singleton list offilterwill be returned.- Parameters:
filter- the filter- Returns:
- the and-extracted filter
-
invert
Filter invert()The logical inversion ofthis. While logically equivalent toFilter.not(this), implementations of this method will return more specifically typed inversions where applicable.- Returns:
- the inverse filter
- See Also:
-
withSerial
Description copied from interface:ConcurrencyControlApplies serial concurrency control to the expression.The serial wrapped filter/selectable is guaranteed to process exactly the set of rows as if any prior filters/selectables were applied, but it will do so in a serial manner. If this is a filter, then the expression will not evaluate additional rows or skip rows that future filters may eliminate. Take care when selecting marking filters/selectables as serial, as the operation will not be able to take advantage of powerful optimizations.
- Concurrency impact: The expression will never be invoked concurrently with itself.
- Intra-expression ordering impact: Rows are evaluated sequentially in row set order.
-
Inter-expression ordering impact: For a filter, serial acts as an absolute reordering barrier, ensuring that no parts of a filter are executed out of order relative to this serial wrapper.
For selectables, additional ordering constraints are controlled by the value of the
QueryTable.SERIAL_SELECT_IMPLICIT_BARRIERS. This is set by the propertyQueryTable.serialSelectImplicitBarriers(defaulting to the value ofQueryTable.statelessSelectByDefault).If
QueryTable.SERIAL_SELECT_IMPLICIT_BARRIERSis false, then no additional ordering between selectable expressions is imposed. As with every select or update call, if column B references column A, then the necessary inputs from column A are evaluated before column B is evaluated. To impose further ordering constraints, use barriers.If
QueryTable.SERIAL_SELECT_IMPLICIT_BARRIERSis true, then a serial selectable is an absolute barrier with respect to all other serial selectables. This prohibits serial selectables from being evaluated concurrently, permitting them to access global state. Selectables that are not serial may be reordered with respect to a serial selectable.
- Specified by:
withSerialin interfaceConcurrencyControl<Filter>- Returns:
- a new instance of T with serial concurrency control applied.
-
withRespectedBarriers
Description copied from interface:ConcurrencyControlSpecifies that the filter/selectable should respect the ordering constraints of the given barriers.Filters that define a barrier (using
ConcurrencyControl.withDeclaredBarriers(Object...)) will be executed entirely before filters/selectables that respect that barrier.It is an error to respect a barrier that has not already been defined per the natural left to right ordering of filters/selectables at the operation level. This is to minimize the risk of user error as the API is loosely typed.
Object
equalsandObject.hashCode()hashCode will be used to identify which barriers are respected.- Specified by:
withRespectedBarriersin interfaceConcurrencyControl<Filter>- Parameters:
respectedBarriers- the unique barrier object identifiers to respect- Returns:
- a new instance of T with the respects barrier rule applied
-
withDeclaredBarriers
Description copied from interface:ConcurrencyControlDesignates the filter/selectable as declaring the specified barrier object(s).A barrier does not affect concurrency but imposes an ordering constraint for the filters or selectables that respect the same barrier. When a filter/selectable is marked as respecting a barrier object, it indicates that the respecting filter/selectable will be executed entirely after the filter/selectable declaring the barrier.
Each barrier must be unique and declared by at most one filter. Object
equalsandObject.hashCode()hashCode will be used to determine uniqueness and identification of barrier objects.- Specified by:
withDeclaredBarriersin interfaceConcurrencyControl<Filter>- Parameters:
declaredBarriers- the unique barrier object identifiers- Returns:
- a new instance of T with the declaredBarriers applied
-
walk
-