ArrowWindow

Struct ArrowWindow 

Source
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 is exposed.

Implementations§

Source§

impl<IN, OUT, F, B> ArrowWindow<IN, OUT, F, B>
where IN: ArconType + ToArrow, OUT: ArconType, F: Fn(Arc<Schema>, Vec<RecordBatch>) -> ArconResult<OUT> + ArconFnBounds, B: Backend,

Source

pub fn new(backend: Arc<B>, udf: F) -> Self

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,

Source§

fn persist(&mut self) -> ArconResult<()>

This method ensures all non-persisted data gets pushed to a Backend
Source§

fn set_key(&mut self, _: u64)

Set the current active key for the index
Source§

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,

Source§

type IN = IN

Source§

type OUT = OUT

Source§

fn on_element( &mut self, element: Self::IN, ctx: WindowContext, ) -> ArconResult<()>

The on_element function is called per received window element
Source§

fn result(&mut self, ctx: WindowContext) -> ArconResult<Self::OUT>

The result function is called at the end of a window’s lifetime
Source§

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>
where F: Unpin, IN: Unpin,

§

impl<IN, OUT, F, B> !UnwindSafe for ArrowWindow<IN, OUT, F, B>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> Erased for T