pub enum GroupFilter<V: ?Sized + 'static> {
Simple(Filter<V>),
LastN(usize, Filter<V>),
TopN(usize, Filter<V>, &'static dyn Factory<V>),
BottomN(usize, Filter<V>, &'static dyn Factory<V>),
}Expand description
A filter over a group of values associated with a key.
Simple- retain all values that satisfy a predicate. Doesn’t make any assumptions about the ordering of values.LastN- retains all values that satisfy a predicate and up to a constant number of values preceding the first value that satisfies the predicate. If no value in the group satisfies the predicate, retains the last N values in the group. Assumes that the predicate is monotonic: once it is satisfied for a value, it is also satisfied for all subsequent values for the same key. Also assumed that the values are ordered in some way, so that the last N values under the cursor ate the ones that need to be preserved.TopN- retains all values that satisfy a predicate and up to a constant number of largest values that do not satisfy the predicate. This is similar toLastN, but it does not assume that the predicate is monotonic.
Note that the LastN, TopN and BottomN filters can not be evaluated against
an individual batch and require access to the complete spine that the batch belongs
to. The reason is that some of the last N values in the batch may not be present
in the trace because there may exist retractions for them in other batches within
the spine.
Therefore, these filters are only evaluated as part of a background merge.
See BatchReader::merge_batches_with_snapshot for more details.
Variants§
Simple(Filter<V>)
LastN(usize, Filter<V>)
TopN(usize, Filter<V>, &'static dyn Factory<V>)
BottomN(usize, Filter<V>, &'static dyn Factory<V>)
Implementations§
Source§impl<V: ?Sized + 'static> GroupFilter<V>
impl<V: ?Sized + 'static> GroupFilter<V>
Sourcepub fn requires_snapshot(&self) -> bool
pub fn requires_snapshot(&self) -> bool
Returns true if the filter cannot be evaluated against an individual batch and requires access to the complete spine that the batch belongs to.
Trait Implementations§
Auto Trait Implementations§
impl<V> Freeze for GroupFilter<V>where
V: ?Sized,
impl<V> !RefUnwindSafe for GroupFilter<V>
impl<V> Send for GroupFilter<V>where
V: ?Sized,
impl<V> Sync for GroupFilter<V>where
V: ?Sized,
impl<V> Unpin for GroupFilter<V>where
V: ?Sized,
impl<V> UnsafeUnpin for GroupFilter<V>where
V: ?Sized,
impl<V> !UnwindSafe for GroupFilter<V>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.