pub struct NthValue { /* private fields */ }
Expand description

nth_value expression

Implementations§

source§

impl NthValue

source

pub fn first( name: impl Into<String>, expr: Arc<dyn PhysicalExpr>, data_type: DataType ) -> Self

Create a new FIRST_VALUE window aggregate function

source

pub fn last( name: impl Into<String>, expr: Arc<dyn PhysicalExpr>, data_type: DataType ) -> Self

Create a new LAST_VALUE window aggregate function

source

pub fn nth( name: impl Into<String>, expr: Arc<dyn PhysicalExpr>, data_type: DataType, n: u32 ) -> Result<Self>

Create a new NTH_VALUE window aggregate function

source

pub fn get_kind(&self) -> NthValueKind

Get nth_value kind

Trait Implementations§

source§

impl BuiltInWindowFunctionExpr for NthValue

source§

fn as_any(&self) -> &dyn Any

Return a reference to Any that can be used for downcasting

source§

fn field(&self) -> Result<Field>

the field of the final result of this aggregation.
source§

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

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

fn create_evaluator(&self) -> Result<Box<dyn PartitionEvaluator>>

Create built-in window evaluator with a batch
source§

fn supports_bounded_execution(&self) -> bool

source§

fn uses_window_frame(&self) -> bool

source§

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>>

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

impl Debug for NthValue

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V