Struct deltalake::datafusion::logical_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>) -> 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.
Trait Implementations§
source§impl Clone for WindowFrame
impl Clone for WindowFrame
source§fn clone(&self) -> WindowFrame
fn clone(&self) -> WindowFrame
Returns a copy 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 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§fn eq(&self, other: &WindowFrame) -> bool
fn eq(&self, other: &WindowFrame) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<WindowFrame> for WindowFrame
impl TryFrom<WindowFrame> for WindowFrame
§type Error = DataFusionError
type Error = DataFusionError
The type returned in the event of a conversion error.
source§fn try_from(value: WindowFrame) -> Result<WindowFrame, DataFusionError>
fn try_from(value: WindowFrame) -> Result<WindowFrame, DataFusionError>
Performs the conversion.
source§impl TryFrom<WindowFrame> for WindowFrame
impl TryFrom<WindowFrame> for WindowFrame
source§fn try_from(
window: WindowFrame
) -> Result<WindowFrame, <WindowFrame as TryFrom<WindowFrame>>::Error>
fn try_from( window: WindowFrame ) -> Result<WindowFrame, <WindowFrame as TryFrom<WindowFrame>>::Error>
Performs the conversion.
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
Mutably borrows from an owned value. Read more
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
Compare self to
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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.