pub struct CompositeAccumulator { /* private fields */ }Expand description
Composite accumulator holding multiple DynAccumulator instances.
Fans out each event to all sub-accumulators and collects results
as a multi-column [RecordBatch].
Implementations§
Source§impl CompositeAccumulator
impl CompositeAccumulator
Sourcepub fn merge(&mut self, other: &Self) -> Result<(), &'static str>
pub fn merge(&mut self, other: &Self) -> Result<(), &'static str>
Merges another composite accumulator into this one.
§Errors
Returns an error if the accumulators have different numbers of sub-accumulators (mismatched window definitions).
Sourcepub fn results(&self) -> Vec<ScalarResult>
pub fn results(&self) -> Vec<ScalarResult>
Returns all results as ScalarResult values.
Sourcepub fn to_record_batch(
&self,
window_id: &WindowId,
schema: &SchemaRef,
) -> Option<RecordBatch>
pub fn to_record_batch( &self, window_id: &WindowId, schema: &SchemaRef, ) -> Option<RecordBatch>
Creates a multi-column [RecordBatch] from the results.
The batch has columns: window_start, window_end, [aggregate results].
§Errors
Returns None if the batch cannot be created.
Sourcepub fn num_accumulators(&self) -> usize
pub fn num_accumulators(&self) -> usize
Returns the number of sub-accumulators.
Trait Implementations§
Source§impl Clone for CompositeAccumulator
impl Clone for CompositeAccumulator
Auto Trait Implementations§
impl Freeze for CompositeAccumulator
impl !RefUnwindSafe for CompositeAccumulator
impl Send for CompositeAccumulator
impl !Sync for CompositeAccumulator
impl Unpin for CompositeAccumulator
impl UnsafeUnpin for CompositeAccumulator
impl !UnwindSafe for CompositeAccumulator
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.