pub struct ArrowWindow<IN, OUT, F, B>where
IN: ArconType + ToArrow,
OUT: ArconType,
F: Fn(Arc<Schema>, Vec<RecordBatch>) -> ArconResult<OUT> + ArconFnBounds,
B: Backend,{ /* private fields */ }Expand description
A window index for Arrow Data
Elements are appended into RecordBatches and once a window is triggered,
the underlying Arrow Schema and Vec
Implementations§
Trait Implementations§
Source§impl<IN, OUT, F, B> IndexOps for ArrowWindow<IN, OUT, F, B>where
IN: ArconType + ToArrow,
OUT: ArconType,
F: Fn(Arc<Schema>, Vec<RecordBatch>) -> ArconResult<OUT> + ArconFnBounds,
B: Backend,
impl<IN, OUT, F, B> IndexOps for ArrowWindow<IN, OUT, F, B>where
IN: ArconType + ToArrow,
OUT: ArconType,
F: Fn(Arc<Schema>, Vec<RecordBatch>) -> ArconResult<OUT> + ArconFnBounds,
B: Backend,
Source§fn persist(&mut self) -> ArconResult<()>
fn persist(&mut self) -> ArconResult<()>
This method ensures all non-persisted data gets pushed to a Backend
Source§fn table(&mut self) -> ArconResult<Option<ImmutableTable>>
fn table(&mut self) -> ArconResult<Option<ImmutableTable>>
Create a [ImmutableTable] from the data in the Index
Source§impl<IN, OUT, F, B> WindowIndex for ArrowWindow<IN, OUT, F, B>where
IN: ArconType + ToArrow,
OUT: ArconType,
F: Fn(Arc<Schema>, Vec<RecordBatch>) -> ArconResult<OUT> + ArconFnBounds,
B: Backend,
impl<IN, OUT, F, B> WindowIndex for ArrowWindow<IN, OUT, F, B>where
IN: ArconType + ToArrow,
OUT: ArconType,
F: Fn(Arc<Schema>, Vec<RecordBatch>) -> ArconResult<OUT> + ArconFnBounds,
B: Backend,
type IN = IN
type OUT = OUT
Source§fn on_element(
&mut self,
element: Self::IN,
ctx: WindowContext,
) -> ArconResult<()>
fn on_element( &mut self, element: Self::IN, ctx: WindowContext, ) -> ArconResult<()>
The
on_element function is called per received window elementSource§fn result(&mut self, ctx: WindowContext) -> ArconResult<Self::OUT>
fn result(&mut self, ctx: WindowContext) -> ArconResult<Self::OUT>
The
result function is called at the end of a window’s lifetimeSource§fn clear(&mut self, ctx: WindowContext) -> ArconResult<()>
fn clear(&mut self, ctx: WindowContext) -> ArconResult<()>
Clears the window state for the passed context
Auto Trait Implementations§
impl<IN, OUT, F, B> !Freeze for ArrowWindow<IN, OUT, F, B>
impl<IN, OUT, F, B> !RefUnwindSafe for ArrowWindow<IN, OUT, F, B>
impl<IN, OUT, F, B> Send for ArrowWindow<IN, OUT, F, B>
impl<IN, OUT, F, B> !Sync for ArrowWindow<IN, OUT, F, B>
impl<IN, OUT, F, B> Unpin for ArrowWindow<IN, OUT, F, B>
impl<IN, OUT, F, B> !UnwindSafe for ArrowWindow<IN, OUT, F, B>
Blanket Implementations§
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