@@ -19,9 +19,7 @@ use pyo3::{prelude::*, wrap_pyfunction};
19
19
20
20
use datafusion:: logical_plan;
21
21
22
- use datafusion:: physical_plan:: {
23
- aggregates:: AggregateFunction , functions:: BuiltinScalarFunction ,
24
- } ;
22
+ use datafusion:: physical_plan:: { aggregates:: AggregateFunction , functions:: BuiltinScalarFunction } ;
25
23
26
24
use crate :: errors;
27
25
use crate :: expression:: PyExpr ;
@@ -88,11 +86,7 @@ fn concat_ws(sep: String, args: Vec<PyExpr>) -> PyResult<PyExpr> {
88
86
89
87
/// Creates a new Sort expression
90
88
#[ pyfunction]
91
- fn order_by (
92
- expr : PyExpr ,
93
- asc : Option < bool > ,
94
- nulls_first : Option < bool > ,
95
- ) -> PyResult < PyExpr > {
89
+ fn order_by ( expr : PyExpr , asc : Option < bool > , nulls_first : Option < bool > ) -> PyResult < PyExpr > {
96
90
Ok ( PyExpr {
97
91
expr : datafusion:: logical_plan:: Expr :: Sort {
98
92
expr : Box :: new ( expr. expr ) ,
@@ -106,10 +100,7 @@ fn order_by(
106
100
#[ pyfunction]
107
101
fn alias ( expr : PyExpr , name : & str ) -> PyResult < PyExpr > {
108
102
Ok ( PyExpr {
109
- expr : datafusion:: logical_plan:: Expr :: Alias (
110
- Box :: new ( expr. expr ) ,
111
- String :: from ( name) ,
112
- ) ,
103
+ expr : datafusion:: logical_plan:: Expr :: Alias ( Box :: new ( expr. expr ) , String :: from ( name) ) ,
113
104
} )
114
105
}
115
106
@@ -244,7 +235,11 @@ scalar_function!(sha384, SHA384);
244
235
scalar_function ! ( sha512, SHA512 ) ;
245
236
scalar_function ! ( signum, Signum ) ;
246
237
scalar_function ! ( sin, Sin ) ;
247
- scalar_function ! ( split_part, SplitPart , "Splits string at occurrences of delimiter and returns the n'th field (counting from one)." ) ;
238
+ scalar_function ! (
239
+ split_part,
240
+ SplitPart ,
241
+ "Splits string at occurrences of delimiter and returns the n'th field (counting from one)."
242
+ ) ;
248
243
scalar_function ! ( sqrt, Sqrt ) ;
249
244
scalar_function ! (
250
245
starts_with,
0 commit comments