Skip to content

Commit 8311b05

Browse files
migrate from function-array to functions-nested
The package was renamed upstream. Ref: apache/datafusion#11602
1 parent 1795e9a commit 8311b05

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ arrow = { version = "52", feature = ["pyarrow"] }
4141
datafusion = { git = "https://github.com/apache/datafusion.git", features = ["pyarrow", "avro", "unicode_expressions"] }
4242
datafusion-common = { git = "https://github.com/apache/datafusion.git", features = ["pyarrow"] }
4343
datafusion-expr = { git = "https://github.com/apache/datafusion.git" }
44-
datafusion-functions-array = { git = "https://github.com/apache/datafusion.git", package = "datafusion-functions-nested" }
44+
datafusion-functions-nested = { git = "https://github.com/apache/datafusion.git" }
45+
# TODO: is this just re-exported?
4546
datafusion-optimizer = { git = "https://github.com/apache/datafusion.git" }
47+
# TODO: is this just re-exported?
4648
datafusion-sql = { git = "https://github.com/apache/datafusion.git" }
4749
datafusion-substrait = { git = "https://github.com/apache/datafusion.git", optional = true }
4850
prost = "0.12" # keep in line with `datafusion-substrait`

src/functions.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -388,14 +388,14 @@ fn in_list(expr: PyExpr, value: Vec<PyExpr>, negated: bool) -> PyExpr {
388388

389389
#[pyfunction]
390390
fn make_array(exprs: Vec<PyExpr>) -> PyExpr {
391-
datafusion_functions_array::expr_fn::make_array(exprs.into_iter().map(|x| x.into()).collect())
391+
datafusion_functions_nested::expr_fn::make_array(exprs.into_iter().map(|x| x.into()).collect())
392392
.into()
393393
}
394394

395395
#[pyfunction]
396396
fn array_concat(exprs: Vec<PyExpr>) -> PyExpr {
397397
let exprs = exprs.into_iter().map(|x| x.into()).collect();
398-
datafusion_functions_array::expr_fn::array_concat(exprs).into()
398+
datafusion_functions_nested::expr_fn::array_concat(exprs).into()
399399
}
400400

401401
#[pyfunction]
@@ -407,12 +407,12 @@ fn array_cat(exprs: Vec<PyExpr>) -> PyExpr {
407407
fn array_position(array: PyExpr, element: PyExpr, index: Option<i64>) -> PyExpr {
408408
let index = ScalarValue::Int64(index);
409409
let index = Expr::Literal(index);
410-
datafusion_functions_array::expr_fn::array_position(array.into(), element.into(), index).into()
410+
datafusion_functions_nested::expr_fn::array_position(array.into(), element.into(), index).into()
411411
}
412412

413413
#[pyfunction]
414414
fn array_slice(array: PyExpr, begin: PyExpr, end: PyExpr, stride: Option<PyExpr>) -> PyExpr {
415-
datafusion_functions_array::expr_fn::array_slice(
415+
datafusion_functions_nested::expr_fn::array_slice(
416416
array.into(),
417417
begin.into(),
418418
end.into(),
@@ -695,7 +695,7 @@ macro_rules! expr_fn_vec {
695695
};
696696
}
697697

698-
/// Generates a [pyo3] wrapper for [datafusion_functions_array::expr_fn]
698+
/// Generates a [pyo3] wrapper for [datafusion_functions_nested::expr_fn]
699699
///
700700
/// These functions have explicit named arguments.
701701
macro_rules! array_fn {
@@ -712,7 +712,7 @@ macro_rules! array_fn {
712712
#[doc = $DOC]
713713
#[pyfunction]
714714
fn $FUNC($($arg: PyExpr),*) -> PyExpr {
715-
datafusion_functions_array::expr_fn::$FUNC($($arg.into()),*).into()
715+
datafusion_functions_nested::expr_fn::$FUNC($($arg.into()),*).into()
716716
}
717717
};
718718
}

0 commit comments

Comments
 (0)