This repository was archived by the owner on Jul 25, 2022. It is now read-only.
File tree 4 files changed +8
-10
lines changed
4 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ impl PyExecutionContext {
67
67
// generate a random (unique) name for this table
68
68
// table name cannot start with numeric digit
69
69
let name = "c" . to_owned ( )
70
- + & Uuid :: new_v4 ( )
70
+ + Uuid :: new_v4 ( )
71
71
. to_simple ( )
72
72
. encode_lower ( & mut Uuid :: encode_buffer ( ) ) ;
73
73
Original file line number Diff line number Diff line change @@ -62,15 +62,15 @@ impl PyNumberProtocol for PyExpr {
62
62
}
63
63
64
64
fn __mod__ ( lhs : PyExpr , rhs : PyExpr ) -> PyResult < PyExpr > {
65
- Ok ( lhs. expr . clone ( ) . modulus ( rhs. expr ) . into ( ) )
65
+ Ok ( lhs. expr . modulus ( rhs. expr ) . into ( ) )
66
66
}
67
67
68
68
fn __and__ ( lhs : PyExpr , rhs : PyExpr ) -> PyResult < PyExpr > {
69
- Ok ( lhs. expr . clone ( ) . and ( rhs. expr ) . into ( ) )
69
+ Ok ( lhs. expr . and ( rhs. expr ) . into ( ) )
70
70
}
71
71
72
72
fn __or__ ( lhs : PyExpr , rhs : PyExpr ) -> PyResult < PyExpr > {
73
- Ok ( lhs. expr . clone ( ) . or ( rhs. expr ) . into ( ) )
73
+ Ok ( lhs. expr . or ( rhs. expr ) . into ( ) )
74
74
}
75
75
76
76
fn __invert__ ( & self ) -> PyResult < PyExpr > {
@@ -140,7 +140,7 @@ impl PyMappingProtocol for PyExpr {
140
140
fn __getitem__ ( & self , key : & str ) -> PyResult < PyExpr > {
141
141
Ok ( Expr :: GetIndexedField {
142
142
expr : Box :: new ( self . expr . clone ( ) ) ,
143
- key : ScalarValue :: Utf8 ( Some ( key. to_string ( ) ) . to_owned ( ) ) ,
143
+ key : ScalarValue :: Utf8 ( Some ( key. to_string ( ) ) ) ,
144
144
}
145
145
. into ( ) )
146
146
}
Original file line number Diff line number Diff line change @@ -119,13 +119,11 @@ fn window(
119
119
expr : datafusion:: logical_plan:: Expr :: WindowFunction {
120
120
fun,
121
121
args : args. into_iter ( ) . map ( |x| x. expr ) . collect :: < Vec < _ > > ( ) ,
122
- partition_by : partition_by
123
- . unwrap_or ( vec ! [ ] )
122
+ partition_by : partition_by. unwrap_or_default ( )
124
123
. into_iter ( )
125
124
. map ( |x| x. expr )
126
125
. collect :: < Vec < _ > > ( ) ,
127
- order_by : order_by
128
- . unwrap_or ( vec ! [ ] )
126
+ order_by : order_by. unwrap_or_default ( )
129
127
. into_iter ( )
130
128
. map ( |x| x. expr )
131
129
. collect :: < Vec < _ > > ( ) ,
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ impl PyAggregateUDF {
133
133
volatility : & str ,
134
134
) -> PyResult < Self > {
135
135
let function = logical_plan:: create_udaf (
136
- & name,
136
+ name,
137
137
input_type,
138
138
Arc :: new ( return_type) ,
139
139
parse_volatility ( volatility) ?,
You can’t perform that action at this time.
0 commit comments