pub enum WindowFunction {
Show 14 variants
Lag {
expr: Box<Expr>,
offset: usize,
default: Option<Box<Expr>>,
},
Lead {
expr: Box<Expr>,
offset: usize,
default: Option<Box<Expr>>,
},
RowNumber,
Rank,
DenseRank,
Ntile(usize),
FirstValue(Box<Expr>),
LastValue(Box<Expr>),
NthValue(Box<Expr>, usize),
Sum(Box<Expr>),
Avg(Box<Expr>),
Min(Box<Expr>),
Max(Box<Expr>),
Count(Option<Box<Expr>>),
}Expand description
SQL-style window function
Variants§
Lag
LAG(expr, offset, default) - access previous row value
Lead
LEAD(expr, offset, default) - access next row value
RowNumber
ROW_NUMBER() - sequential row number in partition
Rank
RANK() - rank with gaps for ties
DenseRank
DENSE_RANK() - rank without gaps
Ntile(usize)
NTILE(n) - divide rows into n buckets
FirstValue(Box<Expr>)
FIRST_VALUE(expr) - first value in window
LastValue(Box<Expr>)
LAST_VALUE(expr) - last value in window
NthValue(Box<Expr>, usize)
NTH_VALUE(expr, n) - nth value in window
Sum(Box<Expr>)
Running aggregate functions
Avg(Box<Expr>)
Min(Box<Expr>)
Max(Box<Expr>)
Count(Option<Box<Expr>>)
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 · 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
Source§impl<'de> Deserialize<'de> for WindowFunction
impl<'de> Deserialize<'de> for WindowFunction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for WindowFunction
impl PartialEq for WindowFunction
Source§impl Serialize for WindowFunction
impl Serialize for WindowFunction
impl StructuralPartialEq for WindowFunction
Auto Trait Implementations§
impl Freeze for WindowFunction
impl RefUnwindSafe for WindowFunction
impl Send for WindowFunction
impl Sync for WindowFunction
impl Unpin for WindowFunction
impl UnsafeUnpin for WindowFunction
impl UnwindSafe for WindowFunction
Blanket Implementations§
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