Struct datafusion_physical_expr::expressions::NthValue
source · pub struct NthValue { /* private fields */ }
Expand description
nth_value expression
Implementations§
source§impl NthValue
impl NthValue
sourcepub fn first(
name: impl Into<String>,
expr: Arc<dyn PhysicalExpr>,
data_type: DataType
) -> Self
pub fn first(
name: impl Into<String>,
expr: Arc<dyn PhysicalExpr>,
data_type: DataType
) -> Self
Create a new FIRST_VALUE window aggregate function
sourcepub fn last(
name: impl Into<String>,
expr: Arc<dyn PhysicalExpr>,
data_type: DataType
) -> Self
pub fn last(
name: impl Into<String>,
expr: Arc<dyn PhysicalExpr>,
data_type: DataType
) -> Self
Create a new LAST_VALUE window aggregate function
Trait Implementations§
source§impl BuiltInWindowFunctionExpr for NthValue
impl BuiltInWindowFunctionExpr for NthValue
source§fn expressions(&self) -> Vec<Arc<dyn PhysicalExpr>> ⓘ
fn expressions(&self) -> Vec<Arc<dyn PhysicalExpr>> ⓘ
expressions that are passed to the Accumulator.
Single-column aggregations such as
sum
return a single value, others (e.g. cov
) return many.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 create_evaluator(&self) -> Result<Box<dyn PartitionEvaluator>>
fn create_evaluator(&self) -> Result<Box<dyn PartitionEvaluator>>
Create built-in window evaluator with a batch
fn supports_bounded_execution(&self) -> bool
fn uses_window_frame(&self) -> bool
source§fn reverse_expr(&self) -> Option<Arc<dyn BuiltInWindowFunctionExpr>>
fn reverse_expr(&self) -> Option<Arc<dyn BuiltInWindowFunctionExpr>>
Construct Reverse Expression that produces the same result
on a reversed window. For example
lead(10)
–> lag(10)
source§fn evaluate_args(&self, batch: &RecordBatch) -> Result<Vec<ArrayRef>>
fn evaluate_args(&self, batch: &RecordBatch) -> Result<Vec<ArrayRef>>
Evaluate window function arguments against the batch and return
an array ref. Typically, the resulting vector is a single element vector.