Skip to main content

WindowEvalContext

Struct WindowEvalContext 

Source
#[non_exhaustive]
pub struct WindowEvalContext<'a> { pub most_recent_row: Option<&'a RecordBatch>, }
Expand description

Stream-level context passed to WindowExpr::evaluate_stateful.

This carries information that spans all partitions of the input, as opposed to the per-partition state in PartitionBatches and PartitionWindowAggStates. It is non_exhaustive so that fields can be added without breaking implementors; construct it with Default::default and the with_* builder methods.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§most_recent_row: Option<&'a RecordBatch>

A single-row batch containing the most recent input row, whichever partition that row belongs to. It is Some only when the input is ordered by the first ORDER BY column across partitions (Linear mode), in which case no future input row – in any partition – can precede it in that column; implementations can use this bound to decide whether pending window frames can be finalized before their partition receives more data.

Implementations§

Source§

impl<'a> WindowEvalContext<'a>

Source

pub fn with_most_recent_row(self, batch: Option<&'a RecordBatch>) -> Self

Sets the most recent input row (see Self::most_recent_row).

Trait Implementations§

Source§

impl<'a> Clone for WindowEvalContext<'a>

Source§

fn clone(&self) -> WindowEvalContext<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for WindowEvalContext<'a>

Source§

impl<'a> Debug for WindowEvalContext<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Default for WindowEvalContext<'a>

Source§

fn default() -> WindowEvalContext<'a>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for WindowEvalContext<'a>

§

impl<'a> !UnwindSafe for WindowEvalContext<'a>

§

impl<'a> Freeze for WindowEvalContext<'a>

§

impl<'a> Send for WindowEvalContext<'a>

§

impl<'a> Sync for WindowEvalContext<'a>

§

impl<'a> Unpin for WindowEvalContext<'a>

§

impl<'a> UnsafeUnpin for WindowEvalContext<'a>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.