Skip to content

Commit

Permalink
lint: allow(deprecated) for make_scalar_function
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-J-Ward committed May 7, 2024
1 parent ecf6d48 commit d691014
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 @@ -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;
Expand All @@ -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<ArrayRef, DataFusionError> {
Python::with_gil(|py| {
// 1. cast args to Pyarrow arrays
Expand Down

0 comments on commit d691014

Please sign in to comment.