pub trait BuiltInWindowFunctionExpr: Send + Sync + Debug {
    fn as_any(&self) -> &dyn Any;
    fn field(&self) -> Result<Field>;
    fn expressions(&self) -> Vec<Arc<dyn PhysicalExpr>> ;
    fn create_evaluator(&self) -> Result<Box<dyn PartitionEvaluator>>;

    fn name(&self) -> &str { ... }
    fn evaluate_args(&self, batch: &RecordBatch) -> Result<Vec<ArrayRef>> { ... }
    fn reverse_expr(&self) -> Option<Arc<dyn BuiltInWindowFunctionExpr>> { ... }
    fn supports_bounded_execution(&self) -> bool { ... }
    fn uses_window_frame(&self) -> bool { ... }
}
Expand description

A window expression that is a built-in window function.

Note that unlike aggregation based window functions, built-in window functions normally ignore window frame spec, with the exception of first_value, last_value, and nth_value.

Required Methods§

Returns the aggregate expression as Any so that it can be downcast to a specific implementation.

the field of the final result of this aggregation.

expressions that are passed to the Accumulator. Single-column aggregations such as sum return a single value, others (e.g. cov) return many.

Create built-in window evaluator with a batch

Provided Methods§

Human readable name such as "MIN(c2)" or "RANK()". The default implementation returns placeholder text.

Evaluate window function arguments against the batch and return an array ref. Typically, the resulting vector is a single element vector.

Construct Reverse Expression that produces the same result on a reversed window. For example lead(10) –> lag(10)

Implementors§