From 8888848c796a277f5eb9a995a8f5b712673f28b4 Mon Sep 17 00:00:00 2001 From: Michael-J-Ward Date: Tue, 10 Sep 2024 12:39:14 -0500 Subject: [PATCH] update use of FromPyArrow trait FromPyArrow::from_pyarrow was removed upstream. Ref: https://github.com/apache/arrow-rs/pull/6075 --- src/udf.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/udf.rs b/src/udf.rs index 8bd9021d4..31ddd3885 100644 --- a/src/udf.rs +++ b/src/udf.rs @@ -43,7 +43,7 @@ fn to_rust_function(func: PyObject) -> ScalarFunctionImplementation { .iter() .map(|arg| arg.into_data().to_pyarrow(py).unwrap()) .collect::>(); - let py_args = PyTuple::new(py, py_args); + let py_args = PyTuple::new_bound(py, py_args); // 2. call function let value = func @@ -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)) }) },