Skip to content

Commit

Permalink
update use of FromPyArrow trait
Browse files Browse the repository at this point in the history
FromPyArrow::from_pyarrow was removed upstream.

Ref: apache/arrow-rs#6075
  • Loading branch information
Michael-J-Ward committed Sep 10, 2024
1 parent 94f02de commit 8888848
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/udf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn to_rust_function(func: PyObject) -> ScalarFunctionImplementation {
.iter()
.map(|arg| arg.into_data().to_pyarrow(py).unwrap())
.collect::<Vec<_>>();
let py_args = PyTuple::new(py, py_args);
let py_args = PyTuple::new_bound(py, py_args);

// 2. call function
let value = func
Expand All @@ -52,7 +52,7 @@ fn to_rust_function(func: PyObject) -> ScalarFunctionImplementation {
.map_err(|e| DataFusionError::Execution(format!("{e:?}")))?;

// 3. cast to arrow::array::Array
let array_data = ArrayData::from_pyarrow(value).unwrap();
let array_data = ArrayData::from_pyarrow_bound(value).unwrap();
Ok(make_array(array_data))
})
},
Expand Down

0 comments on commit 8888848

Please sign in to comment.