diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2ddeebbc558e..4a41fd542e5d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -90,8 +90,8 @@ jobs: # Ensure that the datafusion crate can be built with only a subset of the function # packages enabled. - - name: Check datafusion (array_expressions) - run: cargo check --no-default-features --features=array_expressions -p datafusion + - name: Check datafusion (nested_expressions) + run: cargo check --no-default-features --features=nested_expressions -p datafusion - name: Check datafusion (crypto) run: cargo check --no-default-features --features=crypto_expressions -p datafusion diff --git a/Cargo.toml b/Cargo.toml index 24bde78b3001..cb27a8761a8e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ members = [ "datafusion/execution", "datafusion/functions-aggregate", "datafusion/functions", - "datafusion/functions-array", + "datafusion/functions-nested", "datafusion/optimizer", "datafusion/physical-expr-common", "datafusion/physical-expr", @@ -94,7 +94,7 @@ datafusion-execution = { path = "datafusion/execution", version = "40.0.0" } datafusion-expr = { path = "datafusion/expr", version = "40.0.0" } datafusion-functions = { path = "datafusion/functions", version = "40.0.0" } datafusion-functions-aggregate = { path = "datafusion/functions-aggregate", version = "40.0.0" } -datafusion-functions-array = { path = "datafusion/functions-array", version = "40.0.0" } +datafusion-functions-nested = { path = "datafusion/functions-nested", version = "40.0.0" } datafusion-optimizer = { path = "datafusion/optimizer", version = "40.0.0", default-features = false } datafusion-physical-expr = { path = "datafusion/physical-expr", version = "40.0.0", default-features = false } datafusion-physical-expr-common = { path = "datafusion/physical-expr-common", version = "40.0.0", default-features = false } diff --git a/README.md b/README.md index 197e5d2b3fe1..b1d38b61109f 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ This crate has several [features] which can be specified in your `Cargo.toml`. Default features: -- `array_expressions`: functions for working with arrays such as `array_to_string` +- `nested_expressions`: functions for working with nested type function such as `array_to_string` - `compression`: reading files compressed with `xz2`, `bzip2`, `flate2`, and `zstd` - `crypto_expressions`: cryptographic functions such as `md5` and `sha256` - `datetime_expressions`: date and time functions such as `to_timestamp` diff --git a/datafusion-cli/Cargo.lock b/datafusion-cli/Cargo.lock index 84bff8c87190..a4e87f99b5c3 100644 --- a/datafusion-cli/Cargo.lock +++ b/datafusion-cli/Cargo.lock @@ -1149,7 +1149,7 @@ dependencies = [ "datafusion-expr", "datafusion-functions", "datafusion-functions-aggregate", - "datafusion-functions-array", + "datafusion-functions-nested", "datafusion-optimizer", "datafusion-physical-expr", "datafusion-physical-expr-common", @@ -1315,7 +1315,7 @@ dependencies = [ ] [[package]] -name = "datafusion-functions-array" +name = "datafusion-functions-nested" version = "40.0.0" dependencies = [ "arrow", diff --git a/datafusion/core/Cargo.toml b/datafusion/core/Cargo.toml index 4301396b231f..bed9265ff016 100644 --- a/datafusion/core/Cargo.toml +++ b/datafusion/core/Cargo.toml @@ -40,15 +40,17 @@ name = "datafusion" path = "src/lib.rs" [features] +nested_expressions = ["datafusion-functions-nested"] +# This feature is deprecated. Use the `nested_expressions` feature instead. +array_expressions = ["nested_expressions"] # Used to enable the avro format -array_expressions = ["datafusion-functions-array"] avro = ["apache-avro", "num-traits", "datafusion-common/avro"] backtrace = ["datafusion-common/backtrace"] compression = ["xz2", "bzip2", "flate2", "zstd", "async-compression", "tokio-util"] crypto_expressions = ["datafusion-functions/crypto_expressions"] datetime_expressions = ["datafusion-functions/datetime_expressions"] default = [ - "array_expressions", + "nested_expressions", "crypto_expressions", "datetime_expressions", "encoding_expressions", @@ -102,7 +104,7 @@ datafusion-execution = { workspace = true } datafusion-expr = { workspace = true } datafusion-functions = { workspace = true } datafusion-functions-aggregate = { workspace = true } -datafusion-functions-array = { workspace = true, optional = true } +datafusion-functions-nested = { workspace = true, optional = true } datafusion-optimizer = { workspace = true } datafusion-physical-expr = { workspace = true } datafusion-physical-expr-common = { workspace = true } @@ -221,4 +223,4 @@ name = "parquet_statistic" [[bench]] harness = false name = "map_query_sql" -required-features = ["array_expressions"] +required-features = ["nested_expressions"] diff --git a/datafusion/core/benches/map_query_sql.rs b/datafusion/core/benches/map_query_sql.rs index b6ac8b6b647a..e4c5f7c5deb3 100644 --- a/datafusion/core/benches/map_query_sql.rs +++ b/datafusion/core/benches/map_query_sql.rs @@ -27,7 +27,7 @@ use tokio::runtime::Runtime; use datafusion::prelude::SessionContext; use datafusion_common::ScalarValue; use datafusion_expr::Expr; -use datafusion_functions_array::map::map; +use datafusion_functions_nested::map::map; mod data_utils; diff --git a/datafusion/core/src/execution/session_state_defaults.rs b/datafusion/core/src/execution/session_state_defaults.rs index 0b0465e44605..b7e7b5f0955f 100644 --- a/datafusion/core/src/execution/session_state_defaults.rs +++ b/datafusion/core/src/execution/session_state_defaults.rs @@ -26,8 +26,8 @@ use crate::datasource::file_format::parquet::ParquetFormatFactory; use crate::datasource::file_format::FileFormatFactory; use crate::datasource::provider::{DefaultTableFactory, TableProviderFactory}; use crate::execution::context::SessionState; -#[cfg(feature = "array_expressions")] -use crate::functions_array; +#[cfg(feature = "nested_expressions")] +use crate::functions_nested; use crate::{functions, functions_aggregate}; use datafusion_execution::config::SessionConfig; use datafusion_execution::object_store::ObjectStoreUrl; @@ -82,11 +82,11 @@ impl SessionStateDefaults { pub fn default_expr_planners() -> Vec> { let expr_planners: Vec> = vec![ Arc::new(functions::core::planner::CoreFunctionPlanner::default()), - // register crate of array expressions (if enabled) - #[cfg(feature = "array_expressions")] - Arc::new(functions_array::planner::ArrayFunctionPlanner), - #[cfg(feature = "array_expressions")] - Arc::new(functions_array::planner::FieldAccessPlanner), + // register crate of nested expressions (if enabled) + #[cfg(feature = "nested_expressions")] + Arc::new(functions_nested::planner::NestedFunctionPlanner), + #[cfg(feature = "nested_expressions")] + Arc::new(functions_nested::planner::FieldAccessPlanner), #[cfg(any( feature = "datetime_expressions", feature = "unicode_expressions" @@ -100,8 +100,8 @@ impl SessionStateDefaults { /// returns the list of default [`ScalarUDF']'s pub fn default_scalar_functions() -> Vec> { let mut functions: Vec> = functions::all_default_functions(); - #[cfg(feature = "array_expressions")] - functions.append(&mut functions_array::all_default_array_functions()); + #[cfg(feature = "nested_expressions")] + functions.append(&mut functions_nested::all_default_nested_functions()); functions } @@ -140,8 +140,9 @@ impl SessionStateDefaults { /// registers all the builtin array functions pub fn register_array_functions(state: &mut SessionState) { // register crate of array expressions (if enabled) - #[cfg(feature = "array_expressions")] - functions_array::register_all(state).expect("can not register array expressions"); + #[cfg(feature = "nested_expressions")] + functions_nested::register_all(state) + .expect("can not register nested expressions"); } /// registers all the builtin aggregate functions diff --git a/datafusion/core/src/lib.rs b/datafusion/core/src/lib.rs index 9b9b1db8ff81..9ab6ed527d82 100644 --- a/datafusion/core/src/lib.rs +++ b/datafusion/core/src/lib.rs @@ -458,7 +458,7 @@ //! * [datafusion_execution]: State and structures needed for execution //! * [datafusion_expr]: [`LogicalPlan`], [`Expr`] and related logical planning structure //! * [datafusion_functions]: Scalar function packages -//! * [datafusion_functions_array]: Scalar function packages for `ARRAY`s +//! * [datafusion_functions_nested]: Scalar function packages for `ARRAY`s, `MAP`s and `STRUCT`s //! * [datafusion_optimizer]: [`OptimizerRule`]s and [`AnalyzerRule`]s //! * [datafusion_physical_expr]: [`PhysicalExpr`] and related expressions //! * [datafusion_physical_plan]: [`ExecutionPlan`] and related expressions @@ -569,10 +569,17 @@ pub mod functions { pub use datafusion_functions::*; } -/// re-export of [`datafusion_functions_array`] crate, if "array_expressions" feature is enabled +/// re-export of [`datafusion_functions_nested`] crate, if "nested_expressions" feature is enabled +pub mod functions_nested { + #[cfg(feature = "nested_expressions")] + pub use datafusion_functions_nested::*; +} + +/// re-export of [`datafusion_functions_nested`] crate as [`functions_array`] for backward compatibility, if "nested_expressions" feature is enabled +#[deprecated(since = "41.0.0", note = "use datafusion-functions-nested instead")] pub mod functions_array { - #[cfg(feature = "array_expressions")] - pub use datafusion_functions_array::*; + #[cfg(feature = "nested_expressions")] + pub use datafusion_functions_nested::*; } /// re-export of [`datafusion_functions_aggregate`] crate diff --git a/datafusion/core/src/prelude.rs b/datafusion/core/src/prelude.rs index d82a5a2cc1a1..9c9fcd04bf09 100644 --- a/datafusion/core/src/prelude.rs +++ b/datafusion/core/src/prelude.rs @@ -39,8 +39,8 @@ pub use datafusion_expr::{ Expr, }; pub use datafusion_functions::expr_fn::*; -#[cfg(feature = "array_expressions")] -pub use datafusion_functions_array::expr_fn::*; +#[cfg(feature = "nested_expressions")] +pub use datafusion_functions_nested::expr_fn::*; pub use std::ops::Not; pub use std::ops::{Add, Div, Mul, Neg, Rem, Sub}; diff --git a/datafusion/core/tests/dataframe/dataframe_functions.rs b/datafusion/core/tests/dataframe/dataframe_functions.rs index f7b02196d8ed..7a0e9888a61c 100644 --- a/datafusion/core/tests/dataframe/dataframe_functions.rs +++ b/datafusion/core/tests/dataframe/dataframe_functions.rs @@ -34,7 +34,7 @@ use datafusion_common::{DFSchema, ScalarValue}; use datafusion_expr::expr::Alias; use datafusion_expr::ExprSchemable; use datafusion_functions_aggregate::expr_fn::{approx_median, approx_percentile_cont}; -use datafusion_functions_array::map::map; +use datafusion_functions_nested::map::map; fn test_schema() -> SchemaRef { Arc::new(Schema::new(vec![ diff --git a/datafusion/core/tests/expr_api/mod.rs b/datafusion/core/tests/expr_api/mod.rs index f36f2d539845..37d06355d2d3 100644 --- a/datafusion/core/tests/expr_api/mod.rs +++ b/datafusion/core/tests/expr_api/mod.rs @@ -25,7 +25,7 @@ use datafusion_expr::AggregateExt; use datafusion_functions::core::expr_ext::FieldAccessor; use datafusion_functions_aggregate::first_last::first_value_udaf; use datafusion_functions_aggregate::sum::sum_udaf; -use datafusion_functions_array::expr_ext::{IndexAccessor, SliceAccessor}; +use datafusion_functions_nested::expr_ext::{IndexAccessor, SliceAccessor}; use sqlparser::ast::NullTreatment; /// Tests of using and evaluating `Expr`s outside the context of a LogicalPlan use std::sync::{Arc, OnceLock}; diff --git a/datafusion/core/tests/user_defined/user_defined_scalar_functions.rs b/datafusion/core/tests/user_defined/user_defined_scalar_functions.rs index 219f6c26cf8f..9164e89de8f9 100644 --- a/datafusion/core/tests/user_defined/user_defined_scalar_functions.rs +++ b/datafusion/core/tests/user_defined/user_defined_scalar_functions.rs @@ -45,7 +45,7 @@ use datafusion_expr::{ LogicalPlanBuilder, OperateFunctionArg, ScalarUDF, ScalarUDFImpl, Signature, Volatility, }; -use datafusion_functions_array::range::range_udf; +use datafusion_functions_nested::range::range_udf; /// test that casting happens on udfs. /// c11 is f32, but `custom_sqrt` requires f64. Casting happens but the logical plan and diff --git a/datafusion/expr/src/expr_rewriter/mod.rs b/datafusion/expr/src/expr_rewriter/mod.rs index 8d460bdc8e7d..bf2bfe2c3932 100644 --- a/datafusion/expr/src/expr_rewriter/mod.rs +++ b/datafusion/expr/src/expr_rewriter/mod.rs @@ -42,7 +42,7 @@ pub use order_by::rewrite_sort_cols_by_aggs; /// /// For example, concatenating arrays `a || b` is represented as /// `Operator::ArrowAt`, but can be implemented by calling a function -/// `array_concat` from the `functions-array` crate. +/// `array_concat` from the `functions-nested` crate. // This is not used in datafusion internally, but it is still helpful for downstream project so don't remove it. pub trait FunctionRewrite { /// Return a human readable name for this rewrite diff --git a/datafusion/functions-array/Cargo.toml b/datafusion/functions-nested/Cargo.toml similarity index 92% rename from datafusion/functions-array/Cargo.toml rename to datafusion/functions-nested/Cargo.toml index de424b259694..6a1973ecfed1 100644 --- a/datafusion/functions-array/Cargo.toml +++ b/datafusion/functions-nested/Cargo.toml @@ -16,8 +16,8 @@ # under the License. [package] -name = "datafusion-functions-array" -description = "Array Function packages for the DataFusion query engine" +name = "datafusion-functions-nested" +description = "Nested Type Function packages for the DataFusion query engine" keywords = ["datafusion", "logical", "plan", "expressions"] readme = "README.md" version = { workspace = true } @@ -34,7 +34,7 @@ workspace = true [features] [lib] -name = "datafusion_functions_array" +name = "datafusion_functions_nested" path = "src/lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/datafusion/functions-array/README.md b/datafusion/functions-nested/README.md similarity index 87% rename from datafusion/functions-array/README.md rename to datafusion/functions-nested/README.md index 25deca8e1c77..8a5047c838ab 100644 --- a/datafusion/functions-array/README.md +++ b/datafusion/functions-nested/README.md @@ -17,11 +17,11 @@ under the License. --> -# DataFusion Array Function Library +# DataFusion Nested Type Function Library [DataFusion][df] is an extensible query execution framework, written in Rust, that uses Apache Arrow as its in-memory format. -This crate contains functions for working with arrays, such as `array_append` that work with +This crate contains functions for working with arrays, maps and structs, such as `array_append` that work with `ListArray`, `LargeListArray` and `FixedListArray` types from the `arrow` crate. [df]: https://crates.io/crates/datafusion diff --git a/datafusion/functions-array/benches/array_expression.rs b/datafusion/functions-nested/benches/array_expression.rs similarity index 95% rename from datafusion/functions-array/benches/array_expression.rs rename to datafusion/functions-nested/benches/array_expression.rs index 48b829793cef..0e3ecbc72641 100644 --- a/datafusion/functions-array/benches/array_expression.rs +++ b/datafusion/functions-nested/benches/array_expression.rs @@ -21,7 +21,7 @@ extern crate arrow; use crate::criterion::Criterion; use datafusion_expr::lit; -use datafusion_functions_array::expr_fn::{array_replace_all, make_array}; +use datafusion_functions_nested::expr_fn::{array_replace_all, make_array}; fn criterion_benchmark(c: &mut Criterion) { // Construct large arrays for benchmarking diff --git a/datafusion/functions-array/benches/map.rs b/datafusion/functions-nested/benches/map.rs similarity index 95% rename from datafusion/functions-array/benches/map.rs rename to datafusion/functions-nested/benches/map.rs index c2e0e641e80d..c9a12eefa4fa 100644 --- a/datafusion/functions-array/benches/map.rs +++ b/datafusion/functions-nested/benches/map.rs @@ -28,8 +28,8 @@ use std::sync::Arc; use datafusion_common::ScalarValue; use datafusion_expr::planner::ExprPlanner; use datafusion_expr::{ColumnarValue, Expr}; -use datafusion_functions_array::map::map_udf; -use datafusion_functions_array::planner::ArrayFunctionPlanner; +use datafusion_functions_nested::map::map_udf; +use datafusion_functions_nested::planner::NestedFunctionPlanner; fn keys(rng: &mut ThreadRng) -> Vec { let mut keys = vec![]; @@ -58,7 +58,7 @@ fn criterion_benchmark(c: &mut Criterion) { buffer.push(Expr::Literal(ScalarValue::Int32(Some(values[i])))); } - let planner = ArrayFunctionPlanner {}; + let planner = NestedFunctionPlanner {}; b.iter(|| { black_box( diff --git a/datafusion/functions-array/src/array_has.rs b/datafusion/functions-nested/src/array_has.rs similarity index 100% rename from datafusion/functions-array/src/array_has.rs rename to datafusion/functions-nested/src/array_has.rs diff --git a/datafusion/functions-array/src/cardinality.rs b/datafusion/functions-nested/src/cardinality.rs similarity index 100% rename from datafusion/functions-array/src/cardinality.rs rename to datafusion/functions-nested/src/cardinality.rs diff --git a/datafusion/functions-array/src/concat.rs b/datafusion/functions-nested/src/concat.rs similarity index 100% rename from datafusion/functions-array/src/concat.rs rename to datafusion/functions-nested/src/concat.rs diff --git a/datafusion/functions-array/src/dimension.rs b/datafusion/functions-nested/src/dimension.rs similarity index 100% rename from datafusion/functions-array/src/dimension.rs rename to datafusion/functions-nested/src/dimension.rs diff --git a/datafusion/functions-array/src/empty.rs b/datafusion/functions-nested/src/empty.rs similarity index 100% rename from datafusion/functions-array/src/empty.rs rename to datafusion/functions-nested/src/empty.rs diff --git a/datafusion/functions-array/src/except.rs b/datafusion/functions-nested/src/except.rs similarity index 100% rename from datafusion/functions-array/src/except.rs rename to datafusion/functions-nested/src/except.rs diff --git a/datafusion/functions-array/src/expr_ext.rs b/datafusion/functions-nested/src/expr_ext.rs similarity index 95% rename from datafusion/functions-array/src/expr_ext.rs rename to datafusion/functions-nested/src/expr_ext.rs index 5505ef746881..3524d62d0bc4 100644 --- a/datafusion/functions-array/src/expr_ext.rs +++ b/datafusion/functions-nested/src/expr_ext.rs @@ -35,7 +35,7 @@ use crate::extract::{array_element, array_slice}; /// /// ``` /// # use datafusion_expr::{lit, col, Expr}; -/// # use datafusion_functions_array::expr_ext::IndexAccessor; +/// # use datafusion_functions_nested::expr_ext::IndexAccessor; /// let expr = col("c1") /// .index(lit(3)); /// assert_eq!(expr.display_name().unwrap(), "c1[Int32(3)]"); @@ -65,7 +65,7 @@ impl IndexAccessor for Expr { /// /// ``` /// # use datafusion_expr::{lit, col}; -/// # use datafusion_functions_array::expr_ext::SliceAccessor; +/// # use datafusion_functions_nested::expr_ext::SliceAccessor; /// let expr = col("c1") /// .range(lit(2), lit(4)); /// assert_eq!(expr.display_name().unwrap(), "c1[Int32(2):Int32(4)]"); diff --git a/datafusion/functions-array/src/extract.rs b/datafusion/functions-nested/src/extract.rs similarity index 100% rename from datafusion/functions-array/src/extract.rs rename to datafusion/functions-nested/src/extract.rs diff --git a/datafusion/functions-array/src/flatten.rs b/datafusion/functions-nested/src/flatten.rs similarity index 100% rename from datafusion/functions-array/src/flatten.rs rename to datafusion/functions-nested/src/flatten.rs diff --git a/datafusion/functions-array/src/length.rs b/datafusion/functions-nested/src/length.rs similarity index 100% rename from datafusion/functions-array/src/length.rs rename to datafusion/functions-nested/src/length.rs diff --git a/datafusion/functions-array/src/lib.rs b/datafusion/functions-nested/src/lib.rs similarity index 93% rename from datafusion/functions-array/src/lib.rs rename to datafusion/functions-nested/src/lib.rs index f68f59dcd6a1..ef2c5e709bc1 100644 --- a/datafusion/functions-array/src/lib.rs +++ b/datafusion/functions-nested/src/lib.rs @@ -17,9 +17,9 @@ // Make cheap clones clear: https://github.com/apache/datafusion/issues/11143 #![deny(clippy::clone_on_ref_ptr)] -//! Array Functions for [DataFusion]. +//! Nested type Functions for [DataFusion]. //! -//! This crate contains a collection of array functions implemented using the +//! This crate contains a collection of nested type functions implemented using the //! extension API. //! //! [DataFusion]: https://crates.io/crates/datafusion @@ -102,8 +102,8 @@ pub mod expr_fn { pub use super::string::string_to_array; } -/// Return all default array functions -pub fn all_default_array_functions() -> Vec> { +/// Return all default nested type functions +pub fn all_default_nested_functions() -> Vec> { vec![ string::array_to_string_udf(), string::string_to_array_udf(), @@ -148,7 +148,7 @@ pub fn all_default_array_functions() -> Vec> { /// Registers all enabled packages with a [`FunctionRegistry`] pub fn register_all(registry: &mut dyn FunctionRegistry) -> Result<()> { - let functions: Vec> = all_default_array_functions(); + let functions: Vec> = all_default_nested_functions(); functions.into_iter().try_for_each(|udf| { let existing_udf = registry.register_udf(udf)?; if let Some(existing_udf) = existing_udf { @@ -162,14 +162,14 @@ pub fn register_all(registry: &mut dyn FunctionRegistry) -> Result<()> { #[cfg(test)] mod tests { - use crate::all_default_array_functions; + use crate::all_default_nested_functions; use datafusion_common::Result; use std::collections::HashSet; #[test] fn test_no_duplicate_name() -> Result<()> { let mut names = HashSet::new(); - for func in all_default_array_functions() { + for func in all_default_nested_functions() { assert!( names.insert(func.name().to_string().to_lowercase()), "duplicate function name: {}", diff --git a/datafusion/functions-array/src/macros.rs b/datafusion/functions-nested/src/macros.rs similarity index 100% rename from datafusion/functions-array/src/macros.rs rename to datafusion/functions-nested/src/macros.rs diff --git a/datafusion/functions-array/src/make_array.rs b/datafusion/functions-nested/src/make_array.rs similarity index 100% rename from datafusion/functions-array/src/make_array.rs rename to datafusion/functions-nested/src/make_array.rs diff --git a/datafusion/functions-array/src/map.rs b/datafusion/functions-nested/src/map.rs similarity index 100% rename from datafusion/functions-array/src/map.rs rename to datafusion/functions-nested/src/map.rs diff --git a/datafusion/functions-array/src/planner.rs b/datafusion/functions-nested/src/planner.rs similarity index 97% rename from datafusion/functions-array/src/planner.rs rename to datafusion/functions-nested/src/planner.rs index 3f779c9f111e..97c54cc77beb 100644 --- a/datafusion/functions-array/src/planner.rs +++ b/datafusion/functions-nested/src/planner.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -//! SQL planning extensions like [`ArrayFunctionPlanner`] and [`FieldAccessPlanner`] +//! SQL planning extensions like [`NestedFunctionPlanner`] and [`FieldAccessPlanner`] use datafusion_common::{exec_err, utils::list_ndims, DFSchema, Result}; use datafusion_expr::expr::ScalarFunction; @@ -35,9 +35,9 @@ use crate::{ make_array::make_array, }; -pub struct ArrayFunctionPlanner; +pub struct NestedFunctionPlanner; -impl ExprPlanner for ArrayFunctionPlanner { +impl ExprPlanner for NestedFunctionPlanner { fn plan_binary_op( &self, expr: RawBinaryExpr, diff --git a/datafusion/functions-array/src/position.rs b/datafusion/functions-nested/src/position.rs similarity index 100% rename from datafusion/functions-array/src/position.rs rename to datafusion/functions-nested/src/position.rs diff --git a/datafusion/functions-array/src/range.rs b/datafusion/functions-nested/src/range.rs similarity index 100% rename from datafusion/functions-array/src/range.rs rename to datafusion/functions-nested/src/range.rs diff --git a/datafusion/functions-array/src/remove.rs b/datafusion/functions-nested/src/remove.rs similarity index 100% rename from datafusion/functions-array/src/remove.rs rename to datafusion/functions-nested/src/remove.rs diff --git a/datafusion/functions-array/src/repeat.rs b/datafusion/functions-nested/src/repeat.rs similarity index 100% rename from datafusion/functions-array/src/repeat.rs rename to datafusion/functions-nested/src/repeat.rs diff --git a/datafusion/functions-array/src/replace.rs b/datafusion/functions-nested/src/replace.rs similarity index 100% rename from datafusion/functions-array/src/replace.rs rename to datafusion/functions-nested/src/replace.rs diff --git a/datafusion/functions-array/src/resize.rs b/datafusion/functions-nested/src/resize.rs similarity index 100% rename from datafusion/functions-array/src/resize.rs rename to datafusion/functions-nested/src/resize.rs diff --git a/datafusion/functions-array/src/reverse.rs b/datafusion/functions-nested/src/reverse.rs similarity index 100% rename from datafusion/functions-array/src/reverse.rs rename to datafusion/functions-nested/src/reverse.rs diff --git a/datafusion/functions-array/src/set_ops.rs b/datafusion/functions-nested/src/set_ops.rs similarity index 100% rename from datafusion/functions-array/src/set_ops.rs rename to datafusion/functions-nested/src/set_ops.rs diff --git a/datafusion/functions-array/src/sort.rs b/datafusion/functions-nested/src/sort.rs similarity index 100% rename from datafusion/functions-array/src/sort.rs rename to datafusion/functions-nested/src/sort.rs diff --git a/datafusion/functions-array/src/string.rs b/datafusion/functions-nested/src/string.rs similarity index 100% rename from datafusion/functions-array/src/string.rs rename to datafusion/functions-nested/src/string.rs diff --git a/datafusion/functions-array/src/utils.rs b/datafusion/functions-nested/src/utils.rs similarity index 100% rename from datafusion/functions-array/src/utils.rs rename to datafusion/functions-nested/src/utils.rs diff --git a/datafusion/proto/tests/cases/roundtrip_logical_plan.rs b/datafusion/proto/tests/cases/roundtrip_logical_plan.rs index e17515086ecd..25223c3731be 100644 --- a/datafusion/proto/tests/cases/roundtrip_logical_plan.rs +++ b/datafusion/proto/tests/cases/roundtrip_logical_plan.rs @@ -44,7 +44,7 @@ use datafusion::functions_aggregate::expr_fn::{ count_distinct, covar_pop, covar_samp, first_value, grouping, median, stddev, stddev_pop, sum, var_pop, var_sample, }; -use datafusion::functions_array::map::map; +use datafusion::functions_nested::map::map; use datafusion::prelude::*; use datafusion::test_util::{TestTableFactory, TestTableProvider}; use datafusion_common::config::TableOptions; diff --git a/dev/release/README.md b/dev/release/README.md index 9486222c5105..c6bc9be2b0db 100644 --- a/dev/release/README.md +++ b/dev/release/README.md @@ -268,7 +268,7 @@ dot -Tsvg dev/release/crate-deps.dot > dev/release/crate-deps.svg (cd datafusion/functions-aggregate && cargo publish) (cd datafusion/physical-expr && cargo publish) (cd datafusion/functions && cargo publish) -(cd datafusion/functions-array && cargo publish) +(cd datafusion/functions-nested && cargo publish) (cd datafusion/sql && cargo publish) (cd datafusion/optimizer && cargo publish) (cd datafusion/common-runtime && cargo publish) diff --git a/dev/release/crate-deps.dot b/dev/release/crate-deps.dot index 69811c7d6109..1d903a56021d 100644 --- a/dev/release/crate-deps.dot +++ b/dev/release/crate-deps.dot @@ -74,15 +74,15 @@ digraph G { datafusion -> datafusion_execution datafusion -> datafusion_expr datafusion -> datafusion_functions - datafusion -> datafusion_functions_array + datafusion -> datafusion_functions_nested datafusion -> datafusion_optimizer datafusion -> datafusion_physical_expr datafusion -> datafusion_physical_plan datafusion -> datafusion_sql - datafusion_functions_array - datafusion_functions_array -> datafusion_common - datafusion_functions_array -> datafusion_execution - datafusion_functions_array -> datafusion_expr + datafusion_functions_nested + datafusion_functions_nested -> datafusion_common + datafusion_functions_nested -> datafusion_execution + datafusion_functions_nested -> datafusion_expr datafusion_execution datafusion_execution -> datafusion_common datafusion_execution -> datafusion_expr diff --git a/dev/release/crate-deps.svg b/dev/release/crate-deps.svg index cf60bf752642..c76fe3abb4ac 100644 --- a/dev/release/crate-deps.svg +++ b/dev/release/crate-deps.svg @@ -153,15 +153,15 @@ - + -datafusion_functions_array +datafusion_functions_nested -datafusion_functions_array +datafusion_functions_nested - + -datafusion->datafusion_functions_array +datafusion->datafusion_functions_nested @@ -411,21 +411,21 @@ - + -datafusion_functions_array->datafusion_common +datafusion_functions_nested->datafusion_common - + -datafusion_functions_array->datafusion_expr +datafusion_functions_nested->datafusion_expr - + -datafusion_functions_array->datafusion_execution +datafusion_functions_nested->datafusion_execution diff --git a/dev/update_datafusion_versions.py b/dev/update_datafusion_versions.py index 74a8a2ebd5b6..2e3374cd920b 100755 --- a/dev/update_datafusion_versions.py +++ b/dev/update_datafusion_versions.py @@ -35,7 +35,7 @@ 'datafusion-expr': 'datafusion/expr/Cargo.toml', 'datafusion-functions': 'datafusion/functions/Cargo.toml', 'datafusion-functions-aggregate': 'datafusion/functions-aggregate/Cargo.toml', - 'datafusion-functions-array': 'datafusion/functions-array/Cargo.toml', + 'datafusion-functions-nested': 'datafusion/functions-nested/Cargo.toml', 'datafusion-optimizer': 'datafusion/optimizer/Cargo.toml', 'datafusion-physical-expr': 'datafusion/physical-expr/Cargo.toml', 'datafusion-physical-expr-common': 'datafusion/physical-expr-common/Cargo.toml',