Struct datafusion_python::datafusion_expr::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: WindowFrameUnitsFrame type - either ROWS, RANGE or GROUPS
start_bound: WindowFrameBoundStarting frame boundary
end_bound: WindowFrameBoundEnding frame boundary
Implementations§
source§impl WindowFrame
impl WindowFrame
sourcepub fn new(order_by: Option<bool>) -> WindowFrame
pub fn new(order_by: Option<bool>) -> WindowFrame
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) -> WindowFrame
pub fn reverse(&self) -> WindowFrame
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,
) -> WindowFrame
pub fn new_bounds( units: WindowFrameUnits, start_bound: WindowFrameBound, end_bound: WindowFrameBound, ) -> WindowFrame
Initializes window frame from units (type), start bound and end bound.
sourcepub fn regularize_order_bys(
&self,
order_by: &mut Vec<Expr>,
) -> Result<(), DataFusionError>
pub fn regularize_order_bys( &self, order_by: &mut Vec<Expr>, ) -> Result<(), DataFusionError>
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 From<PyWindowFrame> for WindowFrame
impl From<PyWindowFrame> for WindowFrame
source§fn from(window_frame: PyWindowFrame) -> Self
fn from(window_frame: PyWindowFrame) -> Self
source§impl From<WindowFrame> for PyWindowFrame
impl From<WindowFrame> for PyWindowFrame
source§fn from(window_frame: WindowFrame) -> PyWindowFrame
fn from(window_frame: WindowFrame) -> PyWindowFrame
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
source§type Error = DataFusionError
type Error = DataFusionError
source§fn try_from(value: WindowFrame) -> Result<WindowFrame, DataFusionError>
fn try_from(value: WindowFrame) -> Result<WindowFrame, DataFusionError>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
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.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more