pub struct WindowFunctionTail {
pub from_first_last: Option<FromFirstLast>,
pub null_treatment: Option<NullTreatment>,
}Expand description
The MySQL window-function post-) argument tail (SQL:2016):
[FROM {FIRST | LAST}] [{RESPECT | IGNORE} NULLS], written between a null-treatment
window function’s argument ) and its OVER clause.
Both clauses are independently optional and appear in this fixed order (the reverse
order is a mysql:8 ER_PARSE_ERROR); the struct is only constructed when at least
one is present, so a FunctionCall::window_tail of Some always carries a
clause. The NullTreatment value is reused from the in-parenthesis DuckDB form —
only its surface position differs (post-) here, in-paren there), which is why
this is a separate field rather than a shared one.
Fields§
§from_first_last: Option<FromFirstLast>FROM FIRST / FROM LAST — which end of the frame NTH_VALUE counts its Nth
row from. None when unwritten. On mysql:8 only FROM FIRST is accepted (and
only on NTH_VALUE); FROM LAST is grammar-admitted but feature-rejected
(ER_NOT_SUPPORTED_YET, 1235), so the MySQL parser never produces
FromFirstLast::Last.
null_treatment: Option<NullTreatment>RESPECT NULLS / IGNORE NULLS — the post-) null treatment. None when
unwritten. On mysql:8 only RESPECT NULLS is accepted; IGNORE NULLS is
grammar-admitted but feature-rejected (ER_NOT_SUPPORTED_YET, 1235), so the
MySQL parser never produces NullTreatment::IgnoreNulls in this position.
Trait Implementations§
Source§impl Clone for WindowFunctionTail
impl Clone for WindowFunctionTail
Source§fn clone(&self) -> WindowFunctionTail
fn clone(&self) -> WindowFunctionTail
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more