Struct datafusion_expr::window_frame::WindowFrame
source · pub struct WindowFrame {
pub units: WindowFrameUnits,
pub start_bound: WindowFrameBound,
pub end_bound: WindowFrameBound,
/* private fields */
}
Expand description
The frame specification determines which output rows are read by an aggregate
window function. The ending frame boundary can be omitted if the BETWEEN
and AND
keywords that surround the starting frame boundary are also omitted,
in which case the ending frame boundary defaults to CURRENT ROW
.
Fields§
§units: WindowFrameUnits
Frame type - either ROWS
, RANGE
or GROUPS
start_bound: WindowFrameBound
Starting frame boundary
end_bound: WindowFrameBound
Ending frame boundary
Implementations§
source§impl WindowFrame
impl WindowFrame
sourcepub fn new(order_by: Option<bool>) -> Self
pub fn new(order_by: Option<bool>) -> Self
Creates a new, default window frame (with the meaning of default
depending on whether the frame contains an ORDER BY
clause and this
ordering is strict (i.e. no ties).
sourcepub fn reverse(&self) -> Self
pub fn reverse(&self) -> Self
Get reversed window frame. For example
3 ROWS PRECEDING AND 2 ROWS FOLLOWING
–>
2 ROWS PRECEDING AND 3 ROWS FOLLOWING
sourcepub fn new_bounds(
units: WindowFrameUnits,
start_bound: WindowFrameBound,
end_bound: WindowFrameBound,
) -> Self
pub fn new_bounds( units: WindowFrameUnits, start_bound: WindowFrameBound, end_bound: WindowFrameBound, ) -> Self
Initializes window frame from units (type), start bound and end bound.
sourcepub fn regularize_order_bys(&self, order_by: &mut Vec<Expr>) -> Result<()>
pub fn regularize_order_bys(&self, order_by: &mut Vec<Expr>) -> Result<()>
Regularizes the ORDER BY clause of the window frame.
sourcepub fn can_accept_multi_orderby(&self) -> bool
pub fn can_accept_multi_orderby(&self) -> bool
Returns whether the window frame can accept multiple ORDER BY expressons.
Trait Implementations§
source§impl Clone for WindowFrame
impl Clone for WindowFrame
source§fn clone(&self) -> WindowFrame
fn clone(&self) -> WindowFrame
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for WindowFrame
impl Debug for WindowFrame
source§impl Display for WindowFrame
impl Display for WindowFrame
source§impl Hash for WindowFrame
impl Hash for WindowFrame
source§impl PartialEq for WindowFrame
impl PartialEq for WindowFrame
source§impl TryFrom<WindowFrame> for WindowFrame
impl TryFrom<WindowFrame> for WindowFrame
§type Error = DataFusionError
type Error = DataFusionError
source§fn try_from(value: WindowFrame) -> Result<Self>
fn try_from(value: WindowFrame) -> Result<Self>
impl Eq for WindowFrame
impl StructuralPartialEq for WindowFrame
Auto Trait Implementations§
impl Freeze for WindowFrame
impl !RefUnwindSafe for WindowFrame
impl Send for WindowFrame
impl Sync for WindowFrame
impl Unpin for WindowFrame
impl !UnwindSafe for WindowFrame
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.