pub struct WindowSpec {
pub partition_spec: Vec<Expression>,
pub order_spec: Vec<SortOrder>,
pub frame_spec: Option<(FrameType, FrameBound, FrameBound)>,
}Expand description
pyspark.sql.window.WindowSpec
Represents a complete window specification with optional partition, order, and frame specs.
This is built using the static builder methods on Window or by chaining methods on this struct.
Fields§
§partition_spec: Vec<Expression>Expressions to partition by.
order_spec: Vec<SortOrder>Sort orders for the window.
frame_spec: Option<(FrameType, FrameBound, FrameBound)>Optional window frame specification.
Implementations§
Source§impl WindowSpec
impl WindowSpec
Sourcepub fn partition_by(self, cols: Vec<Expression>) -> Self
pub fn partition_by(self, cols: Vec<Expression>) -> Self
Add partition columns to this window specification.
Sourcepub fn order_by(self, sorts: Vec<SortOrder>) -> Self
pub fn order_by(self, sorts: Vec<SortOrder>) -> Self
Set ordering for this window specification.
Sourcepub fn rows_between(self, start: FrameBound, end: FrameBound) -> Self
pub fn rows_between(self, start: FrameBound, end: FrameBound) -> Self
Set the frame specification for ROWS.
Sourcepub fn range_between(self, start: FrameBound, end: FrameBound) -> Self
pub fn range_between(self, start: FrameBound, end: FrameBound) -> Self
Set the frame specification for RANGE.
Trait Implementations§
Source§impl Clone for WindowSpec
impl Clone for WindowSpec
Source§fn clone(&self) -> WindowSpec
fn clone(&self) -> WindowSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 WindowSpec
impl Debug for WindowSpec
Source§impl Default for WindowSpec
impl Default for WindowSpec
Source§impl PartialEq for WindowSpec
impl PartialEq for WindowSpec
impl StructuralPartialEq for WindowSpec
Auto Trait Implementations§
impl Freeze for WindowSpec
impl RefUnwindSafe for WindowSpec
impl Send for WindowSpec
impl Sync for WindowSpec
impl Unpin for WindowSpec
impl UnsafeUnpin for WindowSpec
impl UnwindSafe for WindowSpec
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request