pub struct WindowFunction {
pub fun: WindowFunctionDefinition,
pub params: WindowFunctionParams,
}Expand description
Window function
Holds the actual function to call WindowFunction as well as its
arguments (args) and the contents of the OVER clause:
PARTITION BYORDER BY- Window frame (e.g.
ROWS 1 PRECEDING AND 1 FOLLOWING)
See ExprFunctionExt for examples of how to create a WindowFunction.
Fields§
§fun: WindowFunctionDefinitionName of the function
params: WindowFunctionParamsImplementations§
Source§impl WindowFunction
impl WindowFunction
Sourcepub fn new(
fun: impl Into<WindowFunctionDefinition>,
args: Vec<Expr>,
) -> WindowFunction
pub fn new( fun: impl Into<WindowFunctionDefinition>, args: Vec<Expr>, ) -> WindowFunction
Create a new Window expression with the specified argument an
empty OVER clause
Sourcepub fn simplify(
&self,
) -> Option<Box<dyn Fn(WindowFunction, &SimplifyContext) -> Result<Expr, DataFusionError>>>
pub fn simplify( &self, ) -> Option<Box<dyn Fn(WindowFunction, &SimplifyContext) -> Result<Expr, DataFusionError>>>
Returns this window function’s simplification hook, if any.
See WindowFunctionSimplification for more information
Trait Implementations§
Source§impl Clone for WindowFunction
impl Clone for WindowFunction
Source§fn clone(&self) -> WindowFunction
fn clone(&self) -> WindowFunction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WindowFunction
impl Debug for WindowFunction
impl Eq for WindowFunction
Source§impl From<WindowFunction> for Expr
Create an Expr from a WindowFunction
impl From<WindowFunction> for Expr
Create an Expr from a WindowFunction
Source§fn from(value: WindowFunction) -> Expr
fn from(value: WindowFunction) -> Expr
Converts to this type from the input type.
Source§impl Hash for WindowFunction
impl Hash for WindowFunction
Source§impl PartialEq for WindowFunction
impl PartialEq for WindowFunction
Source§fn eq(&self, other: &WindowFunction) -> bool
fn eq(&self, other: &WindowFunction) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for WindowFunction
impl PartialOrd for WindowFunction
impl StructuralPartialEq for WindowFunction
Auto Trait Implementations§
impl !RefUnwindSafe for WindowFunction
impl !UnwindSafe for WindowFunction
impl Freeze for WindowFunction
impl Send for WindowFunction
impl Sync for WindowFunction
impl Unpin for WindowFunction
impl UnsafeUnpin for WindowFunction
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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