Skip to main content

ApplyOperator

Struct ApplyOperator 

Source
pub struct ApplyOperator { /* private fields */ }
Expand description

Apply (lateral join) operator.

Evaluates inner once for each row of outer. The result schema is outer_columns ++ inner_columns. If the inner plan produces zero rows for a given outer row, that outer row is omitted (inner join semantics).

When param_state is set, outer row values for the specified column indices are injected into the shared ParameterState before each inner execution, allowing the inner plan’s ParameterScanOperator to read them.

Implementations§

Source§

impl ApplyOperator

Source

pub fn new(outer: Box<dyn Operator>, inner: Box<dyn Operator>) -> Self

Creates a new Apply operator (uncorrelated: no parameter injection).

Source

pub fn new_correlated( outer: Box<dyn Operator>, inner: Box<dyn Operator>, param_state: Arc<ParameterState>, param_col_indices: Vec<usize>, ) -> Self

Creates a correlated Apply operator that injects outer row values.

param_state is shared with a ParameterScanOperator in the inner plan. param_col_indices specifies which outer columns to inject (by index).

Source

pub fn with_optional(self, inner_column_count: usize) -> Self

Enables optional (left-join) semantics with the given inner column count.

When enabled, outer rows that produce no inner results will be emitted with NULL values for the inner columns instead of being dropped.

Source

pub fn with_exists_mode(self, keep_matches: bool) -> Self

Enables EXISTS mode: semi-join (keep_matches=true) or anti-join (keep_matches=false). Inner columns are NOT appended to the output.

Trait Implementations§

Source§

impl Operator for ApplyOperator

Source§

fn next(&mut self) -> OperatorResult

Pulls the next batch of data. Returns None when exhausted.
Source§

fn reset(&mut self)

Resets to initial state so you can iterate again.
Source§

fn name(&self) -> &'static str

Returns a name for debugging/explain output.

Auto Trait Implementations§

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> 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> 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.