#[non_exhaustive]pub enum WindowFunc {
RowNumber,
Rank,
DenseRank,
Lag {
expr: Box<Expr>,
offset: usize,
},
Lead {
expr: Box<Expr>,
offset: usize,
},
FirstValue {
expr: Box<Expr>,
},
LastValue {
expr: Box<Expr>,
},
Aggregate {
func: AggregateFunc,
expr: Box<Expr>,
},
}Expand description
윈도우 함수 종류
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
RowNumber
row_number() — 행 번호 (1부터 시작)
Rank
rank() — 순위 (동점 시 같은 순위, 다음 순위 건너뜀)
DenseRank
dense_rank() — 순위 (동점 시 같은 순위, 다음 순위 연속)
Lag
lag(expr, offset) — 이전 행 값 참조
Lead
lead(expr, offset) — 다음 행 값 참조
FirstValue
first_value(expr) — 윈도우 내 첫 번째 값
LastValue
last_value(expr) — 윈도우 내 마지막 값
Aggregate
윈도우 집계: sum(expr) over (...)
Trait Implementations§
Source§impl Clone for WindowFunc
impl Clone for WindowFunc
Source§fn clone(&self) -> WindowFunc
fn clone(&self) -> WindowFunc
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 WindowFunc
impl Debug for WindowFunc
Source§impl PartialEq for WindowFunc
impl PartialEq for WindowFunc
impl StructuralPartialEq for WindowFunc
Auto Trait Implementations§
impl Freeze for WindowFunc
impl RefUnwindSafe for WindowFunc
impl Send for WindowFunc
impl Sync for WindowFunc
impl Unpin for WindowFunc
impl UnsafeUnpin for WindowFunc
impl UnwindSafe for WindowFunc
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