diff --git a/datafusion/functions-nested/src/concat.rs b/datafusion/functions-nested/src/concat.rs index 1bdcf74aee2a..4aa6bb5da9b2 100644 --- a/datafusion/functions-nested/src/concat.rs +++ b/datafusion/functions-nested/src/concat.rs @@ -195,8 +195,10 @@ impl ScalarUDFImpl for ArrayPrepend { } } +static DOCUMENTATION_PREPEND: OnceLock = OnceLock::new(); + fn get_array_prepend_doc() -> &'static Documentation { - DOCUMENTATION.get_or_init(|| { + DOCUMENTATION_PREPEND.get_or_init(|| { Documentation::builder() .with_doc_section(DOC_SECTION_ARRAY) .with_description( diff --git a/docs/source/user-guide/sql/scalar_functions.md b/docs/source/user-guide/sql/scalar_functions.md index 490462909b59..e9cd2bba7d11 100644 --- a/docs/source/user-guide/sql/scalar_functions.md +++ b/docs/source/user-guide/sql/scalar_functions.md @@ -3089,18 +3089,18 @@ array_prepend(element, array) #### Arguments -- **element**: Element to append to the array. +- **element**: Element to prepend to the array. - **array**: Array expression. Can be a constant, column, or function, and any combination of array operators. #### Example ```sql > select array_prepend(1, [2, 3, 4]); -+--------------------------------------+ -| array_prepend(Int64(1), List([2,3,4])) | -+--------------------------------------+ -| [1, 2, 3, 4] | -+--------------------------------------+ ++---------------------------------------+ +| array_prepend(Int64(1),List([2,3,4])) | ++---------------------------------------+ +| [1, 2, 3, 4] | ++---------------------------------------+ ``` #### Aliases