pub struct WindowFrameStateRange {
sort_options: Vec<SortOptions>,
}Expand description
This structure encapsulates all the state information we require as we scan
ranges of data while processing RANGE frames.
Attribute sort_options stores the column ordering specified by the ORDER
BY clause. This information is used to calculate the range.
Fields§
§sort_options: Vec<SortOptions>Implementations§
Source§impl WindowFrameStateRange
impl WindowFrameStateRange
Sourcefn calculate_range(
&mut self,
window_frame: &Arc<WindowFrame>,
last_range: &Range<usize>,
range_columns: &[ArrayRef],
length: usize,
idx: usize,
) -> Result<Range<usize>>
fn calculate_range( &mut self, window_frame: &Arc<WindowFrame>, last_range: &Range<usize>, range_columns: &[ArrayRef], length: usize, idx: usize, ) -> Result<Range<usize>>
This function calculates beginning/ending indices for the frame of the current row.
Sourcefn calculate_index_of_row<const SIDE: bool, const SEARCH_SIDE: bool>(
&mut self,
range_columns: &[ArrayRef],
last_range: &Range<usize>,
idx: usize,
delta: Option<&ScalarValue>,
length: usize,
) -> Result<usize>
fn calculate_index_of_row<const SIDE: bool, const SEARCH_SIDE: bool>( &mut self, range_columns: &[ArrayRef], last_range: &Range<usize>, idx: usize, delta: Option<&ScalarValue>, length: usize, ) -> Result<usize>
This function does the heavy lifting when finding range boundaries. It is meant to be
called twice, in succession, to get window frame start and end indices (with SIDE
supplied as true and false, respectively).
Trait Implementations§
Source§impl Clone for WindowFrameStateRange
impl Clone for WindowFrameStateRange
Source§fn clone(&self) -> WindowFrameStateRange
fn clone(&self) -> WindowFrameStateRange
Returns a duplicate 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 WindowFrameStateRange
impl Debug for WindowFrameStateRange
Source§impl Default for WindowFrameStateRange
impl Default for WindowFrameStateRange
Source§fn default() -> WindowFrameStateRange
fn default() -> WindowFrameStateRange
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WindowFrameStateRange
impl RefUnwindSafe for WindowFrameStateRange
impl Send for WindowFrameStateRange
impl Sync for WindowFrameStateRange
impl Unpin for WindowFrameStateRange
impl UnwindSafe for WindowFrameStateRange
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more