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 new() -> WindowSpec
pub fn new() -> WindowSpec
Create a new empty WindowSpec.
Sourcepub fn partition_by(self, cols: Vec<Expression>) -> WindowSpec
pub fn partition_by(self, cols: Vec<Expression>) -> WindowSpec
Add partition columns to this window specification.
Sourcepub fn order_by(self, sorts: Vec<SortOrder>) -> WindowSpec
pub fn order_by(self, sorts: Vec<SortOrder>) -> WindowSpec
Set ordering for this window specification.
Sourcepub fn rows_between(self, start: FrameBound, end: FrameBound) -> WindowSpec
pub fn rows_between(self, start: FrameBound, end: FrameBound) -> WindowSpec
Set the frame specification for ROWS.
Sourcepub fn range_between(self, start: FrameBound, end: FrameBound) -> WindowSpec
pub fn range_between(self, start: FrameBound, end: FrameBound) -> WindowSpec
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§fn default() -> WindowSpec
fn default() -> WindowSpec
Returns the “default value” for a type. Read more
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
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