File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,12 @@ fn pyarrow_function_to_rust(
4040            // 1. cast args to Pyarrow arrays 
4141            let  py_args = args
4242                . iter ( ) 
43-                 . map ( |arg| arg. into_data ( ) . to_pyarrow ( py) . unwrap ( ) ) 
44-                 . collect :: < Vec < _ > > ( ) ; 
43+                 . map ( |arg| { 
44+                     arg. into_data ( ) 
45+                         . to_pyarrow ( py) 
46+                         . map_err ( |e| DataFusionError :: Execution ( format ! ( "{e:?}" ) ) ) 
47+                 } ) 
48+                 . collect :: < Result < Vec < _ > ,  _ > > ( ) ?; 
4549            let  py_args = PyTuple :: new_bound ( py,  py_args) ; 
4650
4751            // 2. call function 
@@ -50,7 +54,8 @@ fn pyarrow_function_to_rust(
5054                . map_err ( |e| DataFusionError :: Execution ( format ! ( "{e:?}" ) ) ) ?; 
5155
5256            // 3. cast to arrow::array::Array 
53-             let  array_data = ArrayData :: from_pyarrow_bound ( value. bind ( py) ) . unwrap ( ) ; 
57+             let  array_data = ArrayData :: from_pyarrow_bound ( value. bind ( py) ) 
58+                 . map_err ( |e| DataFusionError :: Execution ( format ! ( "{e:?}" ) ) ) ?; 
5459            Ok ( make_array ( array_data) ) 
5560        } ) 
5661    } 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments