pub struct BuiltInWindowExpr { /* private fields */ }
Expand description

A window expr that takes the form of a BuiltInWindowFunctionExpr.

Implementations§

source§

impl BuiltInWindowExpr

source

pub fn new( expr: Arc<dyn BuiltInWindowFunctionExpr>, partition_by: &[Arc<dyn PhysicalExpr>], order_by: &[PhysicalSortExpr], window_frame: Arc<WindowFrame> ) -> BuiltInWindowExpr

create a new built-in window function expression

source

pub fn get_built_in_func_expr(&self) -> &Arc<dyn BuiltInWindowFunctionExpr>

Get BuiltInWindowFunction expr of BuiltInWindowExpr

source

pub fn add_equal_orderings(&self, eq_properties: &mut EquivalenceProperties)

Adds any equivalent orderings generated by the self.expr to builder.

If self.expr doesn’t have an ordering, ordering equivalence properties are not updated. Otherwise, ordering equivalence properties are updated by the ordering of self.expr.

Trait Implementations§

source§

impl Debug for BuiltInWindowExpr

source§

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

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

impl WindowExpr for BuiltInWindowExpr

source§

fn as_any(&self) -> &(dyn Any + 'static)

Return a reference to Any that can be used for downcasting

source§

fn evaluate_stateful( &self, partition_batches: &IndexMap<Vec<ScalarValue>, PartitionBatchState>, window_agg_state: &mut IndexMap<Vec<ScalarValue>, WindowState> ) -> Result<(), DataFusionError>

Evaluate the window function against the batch. This function facilitates stateful, bounded-memory implementations.

source§

fn name(&self) -> &str

Human readable name such as "MIN(c2)" or "RANK()". The default implementation returns placeholder text.
source§

fn field(&self) -> Result<Field, DataFusionError>

The field of the final result of this window function.
source§

fn expressions(&self) -> Vec<Arc<dyn PhysicalExpr>>

Expressions that are passed to the WindowAccumulator. Functions which take a single input argument, such as sum, return a single datafusion_expr::expr::Expr, others (e.g. cov) return many.
source§

fn partition_by(&self) -> &[Arc<dyn PhysicalExpr>]

Expressions that’s from the window function’s partition by clause, empty if absent
source§

fn order_by(&self) -> &[PhysicalSortExpr]

Expressions that’s from the window function’s order by clause, empty if absent
source§

fn evaluate( &self, batch: &RecordBatch ) -> Result<Arc<dyn Array>, DataFusionError>

Evaluate the window function values against the batch
source§

fn get_window_frame(&self) -> &Arc<WindowFrame>

Get the window frame of this WindowExpr.
source§

fn get_reverse_expr(&self) -> Option<Arc<dyn WindowExpr>>

Get the reverse expression of this WindowExpr.
source§

fn uses_bounded_memory(&self) -> bool

Return a flag indicating whether this WindowExpr can run with bounded memory.
source§

fn evaluate_args( &self, batch: &RecordBatch ) -> Result<Vec<Arc<dyn Array>>, DataFusionError>

Evaluate the window function arguments against the batch and return array ref, normally the resulting Vec is a single element one.
source§

fn order_by_columns( &self, batch: &RecordBatch ) -> Result<Vec<SortColumn>, DataFusionError>

Get order by columns, empty if absent

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

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

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

§

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

§

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

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> Ungil for T
where T: Send,