@@ -54,7 +54,7 @@ fn digest(value: PyExpr, method: PyExpr) -> PyExpr {
54
54
/// Concatenates the text representations of all the arguments.
55
55
/// NULL arguments are ignored.
56
56
#[ pyfunction]
57
- #[ pyo3( signature = ( * args) ) ]
57
+ #[ pyo3( signature = ( * args) ) ]
58
58
fn concat ( args : Vec < PyExpr > ) -> PyResult < PyExpr > {
59
59
let args = args. into_iter ( ) . map ( |e| e. expr ) . collect :: < Vec < _ > > ( ) ;
60
60
Ok ( datafusion_expr:: concat ( & args) . into ( ) )
@@ -64,7 +64,7 @@ fn concat(args: Vec<PyExpr>) -> PyResult<PyExpr> {
64
64
/// The first argument is used as the separator string, and should not be NULL.
65
65
/// Other NULL arguments are ignored.
66
66
#[ pyfunction]
67
- #[ pyo3( signature = ( sep, * args) ) ]
67
+ #[ pyo3( signature = ( sep, * args) ) ]
68
68
fn concat_ws ( sep : String , args : Vec < PyExpr > ) -> PyResult < PyExpr > {
69
69
let args = args. into_iter ( ) . map ( |e| e. expr ) . collect :: < Vec < _ > > ( ) ;
70
70
Ok ( datafusion_expr:: concat_ws ( lit ( sep) , args) . into ( ) )
@@ -362,6 +362,8 @@ aggregate_function!(stddev_samp, Stddev);
362
362
aggregate_function ! ( var, Variance ) ;
363
363
aggregate_function ! ( var_pop, VariancePop ) ;
364
364
aggregate_function ! ( var_samp, Variance ) ;
365
+ aggregate_function ! ( first_value, FirstValue ) ;
366
+ aggregate_function ! ( last_value, LastValue ) ;
365
367
366
368
pub ( crate ) fn init_module ( m : & PyModule ) -> PyResult < ( ) > {
367
369
m. add_wrapped ( wrap_pyfunction ! ( abs) ) ?;
@@ -489,6 +491,8 @@ pub(crate) fn init_module(m: &PyModule) -> PyResult<()> {
489
491
m. add_wrapped ( wrap_pyfunction ! ( var_pop) ) ?;
490
492
m. add_wrapped ( wrap_pyfunction ! ( var_samp) ) ?;
491
493
m. add_wrapped ( wrap_pyfunction ! ( window) ) ?;
494
+ m. add_wrapped ( wrap_pyfunction ! ( first_value) ) ?;
495
+ m. add_wrapped ( wrap_pyfunction ! ( last_value) ) ?;
492
496
493
497
//Binary String Functions
494
498
m. add_wrapped ( wrap_pyfunction ! ( encode) ) ?;
0 commit comments