pub struct WindowAggState {
pub window_frame_range: Range<usize>,
pub window_frame_ctx: Option<WindowFrameContext>,
pub last_calculated_index: usize,
pub offset_pruned_rows: usize,
pub out_col: Arc<dyn Array>,
pub n_row_result_missing: usize,
pub is_end: bool,
}Expand description
Holds the state of evaluating a window function
Fields§
§window_frame_range: Range<usize>The range that we calculate the window function
window_frame_ctx: Option<WindowFrameContext>§last_calculated_index: usizeThe index of the last row that its result is calculated inside the partition record batch buffer.
offset_pruned_rows: usizeThe offset of the deleted row number
out_col: Arc<dyn Array>Stores the results calculated by window frame
n_row_result_missing: usizeKeeps track of how many rows should be generated to be in sync with input record_batch.
is_end: boolflag indicating whether we have received all data for this partition
Implementations§
source§impl WindowAggState
impl WindowAggState
pub fn prune_state(&mut self, n_prune: usize)
pub fn update( &mut self, out_col: &Arc<dyn Array>, partition_batch_state: &PartitionBatchState, ) -> Result<(), DataFusionError>
pub fn new(out_type: &DataType) -> Result<WindowAggState, DataFusionError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WindowAggState
impl !RefUnwindSafe for WindowAggState
impl Send for WindowAggState
impl Sync for WindowAggState
impl Unpin for WindowAggState
impl !UnwindSafe for WindowAggState
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> 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 more