diff --git a/datafusion/physical-expr/src/array_expressions.rs b/datafusion/physical-expr/src/array_expressions.rs index 73c3965d5e01..44b747082a5c 100644 --- a/datafusion/physical-expr/src/array_expressions.rs +++ b/datafusion/physical-expr/src/array_expressions.rs @@ -150,8 +150,8 @@ pub fn array(values: &[ColumnarValue]) -> Result { Ok(ColumnarValue::Array(array_array(arrays.as_slice())?)) } -/// make_array SQL function -pub fn array_make(values: &[ColumnarValue]) -> Result { +/// `make_array` SQL function +pub fn make_array(values: &[ColumnarValue]) -> Result { match values[0].data_type() { DataType::Null => Ok(datafusion_expr::ColumnarValue::Scalar( ScalarValue::new_list(Some(vec![]), DataType::Null), @@ -354,7 +354,9 @@ pub fn array_concat(args: &[ColumnarValue]) -> Result { .build() .unwrap(); - return Ok(ColumnarValue::Array(Arc::new(make_array(list)))); + return Ok(ColumnarValue::Array(Arc::new(arrow::array::make_array( + list, + )))); } }, _ => Err(DataFusionError::NotImplemented(format!( diff --git a/datafusion/physical-expr/src/functions.rs b/datafusion/physical-expr/src/functions.rs index 71ce019c6f9a..c45986eb8a74 100644 --- a/datafusion/physical-expr/src/functions.rs +++ b/datafusion/physical-expr/src/functions.rs @@ -404,7 +404,7 @@ pub fn create_physical_fun( Arc::new(array_expressions::array_to_string) } BuiltinScalarFunction::Cardinality => Arc::new(array_expressions::cardinality), - BuiltinScalarFunction::MakeArray => Arc::new(array_expressions::array_make), + BuiltinScalarFunction::MakeArray => Arc::new(array_expressions::make_array), BuiltinScalarFunction::TrimArray => Arc::new(array_expressions::trim_array), // string functions