From e5ca91f852c728d07f8e4bbb36a7587e243aa8fd Mon Sep 17 00:00:00 2001 From: Jia-Xuan Liu Date: Tue, 23 Jul 2024 00:10:52 +0800 Subject: [PATCH] rename the missing parts --- datafusion/core/Cargo.toml | 2 +- datafusion/core/benches/map_query_sql.rs | 2 +- datafusion/core/src/lib.rs | 2 +- .../tests/dataframe/dataframe_functions.rs | 2 +- datafusion/core/tests/expr_api/mod.rs | 2 +- .../user_defined_scalar_functions.rs | 2 +- .../benches/array_expression.rs | 2 +- datafusion/functions-nested/benches/map.rs | 4 ++-- datafusion/functions-nested/src/expr_ext.rs | 4 ++-- dev/release/crate-deps.dot | 10 ++++----- dev/release/crate-deps.svg | 22 +++++++++---------- 11 files changed, 27 insertions(+), 27 deletions(-) diff --git a/datafusion/core/Cargo.toml b/datafusion/core/Cargo.toml index dcf6671061f3..2348c8f6ce72 100644 --- a/datafusion/core/Cargo.toml +++ b/datafusion/core/Cargo.toml @@ -221,4 +221,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/lib.rs b/datafusion/core/src/lib.rs index f14897c1da0c..e6db2caeefdd 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 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/functions-nested/benches/array_expression.rs b/datafusion/functions-nested/benches/array_expression.rs index 48b829793cef..0e3ecbc72641 100644 --- a/datafusion/functions-nested/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-nested/benches/map.rs b/datafusion/functions-nested/benches/map.rs index c2e0e641e80d..77f1765157cb 100644 --- a/datafusion/functions-nested/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::ArrayFunctionPlanner; fn keys(rng: &mut ThreadRng) -> Vec { let mut keys = vec![]; diff --git a/datafusion/functions-nested/src/expr_ext.rs b/datafusion/functions-nested/src/expr_ext.rs index 5505ef746881..3524d62d0bc4 100644 --- a/datafusion/functions-nested/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/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