File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ impl Accumulator for RustAccumulator {
7373 kwargs. set_item ( "type" , py_type) ?;
7474 return pyarrow
7575 . getattr ( "scalar" ) ?
76- . call ( ( list_value, ) , Some ( kwargs) ) ?
76+ . call ( ( list_value, ) , Some ( & kwargs) ) ?
7777 . extract :: < PyScalarValue > ( ) ;
7878 }
7979 value. extract :: < PyScalarValue > ( )
@@ -166,15 +166,17 @@ pub fn to_rust_accumulator(accum: Py<PyAny>) -> AccumulatorFactoryFunction {
166166 } ) ?;
167167 Ok ( Box :: new ( RustAccumulator :: new (
168168 accum,
169- args. return_type . clone ( ) ,
169+ args. return_type ( ) . clone ( ) ,
170170 ) ) )
171171 } )
172172}
173173
174174fn is_pyarrow_array_like ( py : Python < ' _ > , value : & Bound < ' _ , PyAny > ) -> PyResult < bool > {
175175 let pyarrow = PyModule :: import ( py, "pyarrow" ) ?;
176- let array_type = pyarrow. getattr ( "Array" ) ?. downcast :: < PyType > ( ) ?;
177- let chunked_array_type = pyarrow. getattr ( "ChunkedArray" ) ?. downcast :: < PyType > ( ) ?;
176+ let array_attr = pyarrow. getattr ( "Array" ) ?;
177+ let array_type = array_attr. downcast :: < PyType > ( ) ?;
178+ let chunked_array_attr = pyarrow. getattr ( "ChunkedArray" ) ?;
179+ let chunked_array_type = chunked_array_attr. downcast :: < PyType > ( ) ?;
178180 Ok ( value. is_instance ( array_type) ? || value. is_instance ( chunked_array_type) ?)
179181}
180182
You can’t perform that action at this time.
0 commit comments