Struct datafusion_expr::WindowUDF
source · pub struct WindowUDF {
pub name: String,
pub signature: Signature,
pub return_type: ReturnTypeFunction,
pub partition_evaluator_factory: PartitionEvaluatorFactory,
}
Expand description
Logical representation of a user-defined window function (UDWF) A UDWF is different from a UDF in that it is stateful across batches.
See the documetnation on PartitionEvaluator
for more details
Fields§
§name: String
name
signature: Signature
signature
return_type: ReturnTypeFunction
Return type
partition_evaluator_factory: PartitionEvaluatorFactory
Return the partition evaluator
Implementations§
source§impl WindowUDF
impl WindowUDF
sourcepub fn new(
name: &str,
signature: &Signature,
return_type: &ReturnTypeFunction,
partition_evaluator_factory: &PartitionEvaluatorFactory
) -> Self
pub fn new( name: &str, signature: &Signature, return_type: &ReturnTypeFunction, partition_evaluator_factory: &PartitionEvaluatorFactory ) -> Self
Create a new WindowUDF
sourcepub fn call(
&self,
args: Vec<Expr>,
partition_by: Vec<Expr>,
order_by: Vec<Expr>,
window_frame: WindowFrame
) -> Expr
pub fn call( &self, args: Vec<Expr>, partition_by: Vec<Expr>, order_by: Vec<Expr>, window_frame: WindowFrame ) -> Expr
creates a Expr
that calls the window function given
the partition_by
, order_by
, and window_frame
definition
This utility allows using the UDWF without requiring access to the registry, such as with the DataFrame API.
Trait Implementations§
source§impl PartialEq<WindowUDF> for WindowUDF
impl PartialEq<WindowUDF> for WindowUDF
impl Eq for WindowUDF
Auto Trait Implementations§
impl !RefUnwindSafe for WindowUDF
impl Send for WindowUDF
impl Sync for WindowUDF
impl Unpin for WindowUDF
impl !UnwindSafe for WindowUDF
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.