Skip to main content

Window

Struct Window 

Source
pub struct Window<'a> { /* private fields */ }

Implementations§

Source§

impl Window<'static>

Source

pub fn new( child: Box<dyn PhysicalOperator>, spec: WindowSpec, functions: Vec<(String, WindowKind)>, params: Vec<SQLParam>, ) -> Self

Source

pub fn new_with_work_mem( child: Box<dyn PhysicalOperator>, spec: WindowSpec, functions: Vec<(String, WindowKind)>, params: Vec<SQLParam>, work_mem_bytes: usize, ) -> Self

Source§

impl<'a> Window<'a>

Source

pub fn with_executor( child: Box<dyn PhysicalOperator + 'a>, output_schema: Vec<String>, executor: Box<dyn WindowExecutor + 'a>, ) -> Self

Construct a physical window operator backed by the engine’s complete frame and function implementation.

Source

pub fn with_typed_executor( child: Box<dyn PhysicalOperator + 'a>, output_schema: Vec<String>, output_types: Vec<Option<ColumnType>>, executor: Box<dyn WindowExecutor + 'a>, ) -> Self

Source

pub fn with_row_schema_executor( child: Box<dyn PhysicalOperator + 'a>, schema: RowSchema, executor: Box<dyn WindowExecutor + 'a>, ) -> Self

Source

pub fn output_has_spilled(&self) -> bool

Whether final window rows exceeded their output budget and were written to disk during the current/most recent invocation.

Trait Implementations§

Source§

impl PhysicalOperator for Window<'_>

Source§

fn row_schema(&self) -> &RowSchema

Complete logical-to-physical row layout emitted by this operator. Every Batch returned by Self::next must carry this exact schema; operators must reject a child that violates that invariant.
Source§

fn open(&mut self) -> ExecResult<()>

Source§

fn next(&mut self) -> ExecResult<Option<Batch>>

Source§

fn close(&mut self) -> ExecResult<()>

Source§

fn schema(&self) -> &[String]

Schema column names in logical output order.
Source§

fn estimated_cardinality(&self) -> Option<u64>

Planner/runtime cardinality estimate for choosing physical strategies. None means the operator cannot provide a useful estimate. The value is advisory rather than a correctness bound.
Source§

fn output_ordering(&self) -> &[PhysicalOrder]

Leading output ordering known to be preserved by this operator.
Source§

fn consume_into_aggregate( &mut self, _executor: &mut dyn AggregateExecutor, ) -> ExecResult<bool>

Let a leaf consume its native projected rows directly into an aggregate executor. Returning false promises that no input was consumed, so the caller can fall back to ordinary Batch pulls.
Source§

fn collect_materialized( &mut self, _sink: &mut MaterializedResultSink<'_>, ) -> ExecResult<bool>

Fill a native public result from borrowed source values after opening the pipeline. Only complete, effect-free projection chains may forward this request. false guarantees that no row was consumed; the caller retains ordinary pulls and always closes the pipeline.
Source§

fn backward_scan_support(&self) -> BackwardScanSupport

Describe backwards-scan support without changing the operator tree. The default is deliberately conservative so a scrollable cursor freezes the complete output of unclassified plans.
Source§

fn supports_batched_consumption(&self) -> bool

Whether a complete, effect-free consumer may use native batches without changing SQL expression, side-effect or first-error order relative to singleton demand. Unclassified pipelines retain singleton demand. A producer with additional per-row evaluation above its child must establish that ordering independently; row order alone is insufficient.
Source§

fn next_with_demand(&mut self, _rows: NonZeroUsize) -> ExecResult<Option<Batch>>

Pull at most rows newly evaluated output rows. Pipelined expression producers must propagate demand before evaluating their inputs. A semantic materialization boundary may return a larger already-evaluated batch; its consumer retains that remainder without evaluating it again. The default preserves that materialized-batch contract, so an effectful streaming adapter must override this method.
Source§

fn next_direction( &mut self, direction: PhysicalScanDirection, ) -> ExecResult<Option<Batch>>

Pull one directional batch. Native backwards-capable pipelines keep batches to one row so a consumer can reverse direction between adjacent fetches.
Source§

fn rewind(&mut self) -> ExecResult<()>

Rewind a native backwards-capable pipeline without recomputing rows held by semantic materialization boundaries.

Auto Trait Implementations§

§

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

§

impl<'a> !Sync for Window<'a>

§

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

§

impl<'a> Freeze for Window<'a>

§

impl<'a> Send for Window<'a>

§

impl<'a> Unpin for Window<'a>

§

impl<'a> UnsafeUnpin for Window<'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> ErasedDestructor for T
where T: 'static,

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.