pub struct BuiltInWindowExpr { /* private fields */ }
Expand description
A window expr that takes the form of a BuiltInWindowFunctionExpr
.
Implementations§
source§impl BuiltInWindowExpr
impl BuiltInWindowExpr
sourcepub fn new(
expr: Arc<dyn BuiltInWindowFunctionExpr>,
partition_by: &[Arc<dyn PhysicalExpr>],
order_by: &[PhysicalSortExpr],
window_frame: Arc<WindowFrame>
) -> Self
pub fn new( expr: Arc<dyn BuiltInWindowFunctionExpr>, partition_by: &[Arc<dyn PhysicalExpr>], order_by: &[PhysicalSortExpr], window_frame: Arc<WindowFrame> ) -> Self
create a new built-in window function expression
sourcepub fn get_built_in_func_expr(&self) -> &Arc<dyn BuiltInWindowFunctionExpr>
pub fn get_built_in_func_expr(&self) -> &Arc<dyn BuiltInWindowFunctionExpr>
Get BuiltInWindowFunction expr of BuiltInWindowExpr
sourcepub fn add_equal_orderings<F: FnOnce() -> EquivalenceProperties>(
&self,
builder: &mut OrderingEquivalenceBuilder,
equal_properties: F
)
pub fn add_equal_orderings<F: FnOnce() -> EquivalenceProperties>( &self, builder: &mut OrderingEquivalenceBuilder, equal_properties: F )
Adds any equivalent orderings generated by the self.expr
to builder
.
If self.expr
doesn’t have an ordering, ordering equivalence properties
are not updated. Otherwise, ordering equivalence properties are updated
by the ordering of self.expr
.
Trait Implementations§
source§impl Debug for BuiltInWindowExpr
impl Debug for BuiltInWindowExpr
source§impl WindowExpr for BuiltInWindowExpr
impl WindowExpr for BuiltInWindowExpr
source§fn evaluate_stateful(
&self,
partition_batches: &PartitionBatches,
window_agg_state: &mut PartitionWindowAggStates
) -> Result<()>
fn evaluate_stateful( &self, partition_batches: &PartitionBatches, window_agg_state: &mut PartitionWindowAggStates ) -> Result<()>
Evaluate the window function against the batch. This function facilitates stateful, bounded-memory implementations.
source§fn name(&self) -> &str
fn name(&self) -> &str
Human readable name such as
"MIN(c2)"
or "RANK()"
. The default
implementation returns placeholder text.source§fn expressions(&self) -> Vec<Arc<dyn PhysicalExpr>>
fn expressions(&self) -> Vec<Arc<dyn PhysicalExpr>>
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.source§fn 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
source§fn order_by(&self) -> &[PhysicalSortExpr]
fn order_by(&self) -> &[PhysicalSortExpr]
Expressions that’s from the window function’s order by clause, empty if absent
source§fn evaluate(&self, batch: &RecordBatch) -> Result<ArrayRef>
fn evaluate(&self, batch: &RecordBatch) -> Result<ArrayRef>
Evaluate the window function values against the batch
source§fn get_window_frame(&self) -> &Arc<WindowFrame>
fn get_window_frame(&self) -> &Arc<WindowFrame>
Get the window frame of this WindowExpr.
source§fn get_reverse_expr(&self) -> Option<Arc<dyn WindowExpr>>
fn get_reverse_expr(&self) -> Option<Arc<dyn WindowExpr>>
Get the reverse expression of this WindowExpr.
source§fn uses_bounded_memory(&self) -> bool
fn uses_bounded_memory(&self) -> bool
Return a flag indicating whether this WindowExpr can run with
bounded memory.
source§fn 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.source§fn order_by_columns(&self, batch: &RecordBatch) -> Result<Vec<SortColumn>>
fn order_by_columns(&self, batch: &RecordBatch) -> Result<Vec<SortColumn>>
Get order by columns, 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§
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