Struct datafusion_physical_expr::window::BuiltInWindowExpr
source · [−]pub struct BuiltInWindowExpr { /* private fields */ }
Expand description
A window expr that takes the form of a built in window function
Implementations
sourceimpl BuiltInWindowExpr
impl BuiltInWindowExpr
sourcepub fn new(
expr: Arc<dyn BuiltInWindowFunctionExpr>,
partition_by: &[Arc<dyn PhysicalExpr>],
order_by: &[PhysicalSortExpr]
) -> Self
pub fn new(
expr: Arc<dyn BuiltInWindowFunctionExpr>,
partition_by: &[Arc<dyn PhysicalExpr>],
order_by: &[PhysicalSortExpr]
) -> Self
create a new built-in window function expression
Trait Implementations
sourceimpl Debug for BuiltInWindowExpr
impl Debug for BuiltInWindowExpr
sourceimpl WindowExpr for BuiltInWindowExpr
impl WindowExpr for BuiltInWindowExpr
sourcefn name(&self) -> &str
fn name(&self) -> &str
Human readable name such as "MIN(c2)"
or "RANK()"
. The default
implementation returns placeholder text. Read more
sourcefn expressions(&self) -> Vec<Arc<dyn PhysicalExpr>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn expressions(&self) -> Vec<Arc<dyn PhysicalExpr>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
expressions that are passed to the WindowAccumulator.
Functions which take a single input argument, such as sum
, return a single datafusion_expr::expr::Expr
,
others (e.g. cov
) return many. Read more
sourcefn partition_by(&self) -> &[Arc<dyn PhysicalExpr>]
fn partition_by(&self) -> &[Arc<dyn PhysicalExpr>]
expressions that’s from the window function’s partition by clause, empty if absent
sourcefn order_by(&self) -> &[PhysicalSortExpr]
fn order_by(&self) -> &[PhysicalSortExpr]
expressions that’s from the window function’s order by clause, empty if absent
sourcefn evaluate(&self, batch: &RecordBatch) -> Result<ArrayRef>
fn evaluate(&self, batch: &RecordBatch) -> Result<ArrayRef>
evaluate the window function values against the batch
sourcefn evaluate_args(&self, batch: &RecordBatch) -> Result<Vec<ArrayRef>>
fn evaluate_args(&self, batch: &RecordBatch) -> Result<Vec<ArrayRef>>
evaluate the window function arguments against the batch and return array ref, normally the resulting vec is a single element one. Read more
sourcefn evaluate_partition_points(
&self,
num_rows: usize,
partition_columns: &[SortColumn]
) -> Result<Vec<Range<usize>>>
fn evaluate_partition_points(
&self,
num_rows: usize,
partition_columns: &[SortColumn]
) -> Result<Vec<Range<usize>>>
evaluate the partition points given the sort columns; if the sort columns are empty then the result will be a single element vec of the whole column rows. Read more
sourcefn partition_columns(&self, batch: &RecordBatch) -> Result<Vec<SortColumn>>
fn partition_columns(&self, batch: &RecordBatch) -> Result<Vec<SortColumn>>
get partition columns that can be used for partitioning, empty if absent
sourcefn sort_columns(&self, batch: &RecordBatch) -> Result<Vec<SortColumn>>
fn sort_columns(&self, batch: &RecordBatch) -> Result<Vec<SortColumn>>
get sort columns that can be used for peer evaluation, empty if absent
Auto Trait Implementations
impl !RefUnwindSafe for BuiltInWindowExpr
impl Send for BuiltInWindowExpr
impl Sync for BuiltInWindowExpr
impl Unpin for BuiltInWindowExpr
impl !UnwindSafe for BuiltInWindowExpr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more