pub enum WindowFn {
Show 17 variants
RowNumber,
Rank,
DenseRank,
Ntile(u32),
PercentRank,
CumeDist,
Lag {
expr: String,
offset: Option<u32>,
default: Option<String>,
},
Lead {
expr: String,
offset: Option<u32>,
default: Option<String>,
},
FirstValue(String),
LastValue(String),
NthValue(String, u32),
Sum(String),
Avg(String),
Count(String),
Min(String),
Max(String),
Custom {
name: String,
args: Vec<String>,
},
}Expand description
Available window functions.
Variants§
RowNumber
ROW_NUMBER() - Sequential row number.
Rank
RANK() - Rank with gaps.
DenseRank
DENSE_RANK() - Rank without gaps.
Ntile(u32)
NTILE(n) - Distribute rows into n buckets.
PercentRank
PERCENT_RANK() - Relative rank (0 to 1).
CumeDist
CUME_DIST() - Cumulative distribution.
Lag
LAG(expr, offset, default) - Value from previous row.
Lead
LEAD(expr, offset, default) - Value from next row.
FirstValue(String)
FIRST_VALUE(expr) - First value in frame.
LastValue(String)
LAST_VALUE(expr) - Last value in frame.
NthValue(String, u32)
NTH_VALUE(expr, n) - Nth value in frame.
Sum(String)
SUM(expr).
Avg(String)
AVG(expr).
Count(String)
COUNT(expr).
Min(String)
MIN(expr).
Max(String)
MAX(expr).
Custom
Custom function.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WindowFn
impl<'de> Deserialize<'de> for WindowFn
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
impl StructuralPartialEq for WindowFn
Auto Trait Implementations§
impl Freeze for WindowFn
impl RefUnwindSafe for WindowFn
impl Send for WindowFn
impl Sync for WindowFn
impl Unpin for WindowFn
impl UnwindSafe for WindowFn
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