Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion datafusion/functions-nested/src/concat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,10 @@ impl ScalarUDFImpl for ArrayPrepend {
}
}

static DOCUMENTATION_PREPEND: OnceLock<Documentation> = 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(
Expand Down
12 changes: 6 additions & 6 deletions docs/source/user-guide/sql/scalar_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down