From d69101410cc7632af210fd35bcdffdd76491efbe Mon Sep 17 00:00:00 2001 From: Michael-J-Ward Date: Tue, 7 May 2024 12:38:19 -0500 Subject: [PATCH] lint: allow(deprecated) for make_scalar_function --- src/udf.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/udf.rs b/src/udf.rs index af17b57e..69519f49 100644 --- a/src/udf.rs +++ b/src/udf.rs @@ -23,7 +23,6 @@ use datafusion::arrow::array::{make_array, Array, ArrayData, ArrayRef}; use datafusion::arrow::datatypes::DataType; use datafusion::arrow::pyarrow::{FromPyArrow, PyArrowType, ToPyArrow}; use datafusion::error::DataFusionError; -use datafusion::physical_plan::functions::make_scalar_function; use datafusion::physical_plan::udf::ScalarUDF; use datafusion_expr::create_udf; use datafusion_expr::function::ScalarFunctionImplementation; @@ -35,7 +34,8 @@ use crate::utils::parse_volatility; /// that expects pyarrow arrays. This is more efficient as it performs /// a zero-copy of the contents. fn to_rust_function(func: PyObject) -> ScalarFunctionImplementation { - make_scalar_function( + #[allow(deprecated)] + datafusion::physical_plan::functions::make_scalar_function( move |args: &[ArrayRef]| -> Result { Python::with_gil(|py| { // 1. cast args to Pyarrow arrays