mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-30 02:13:33 -04:00
Adding `MV_APPEND(value1, value2)` function, that appends two values creating a single multi-value. If one or both the inputs are multi-values, the result is the concatenation of all the values, eg. ``` MV_APPEND([a, b], [c, d]) -> [a, b, c, d] ``` ~I think for this specific case it makes sense to consider `null` values as empty arrays, so that~ ~MV_APPEND(value, null) -> value~ ~It is pretty uncommon for ESQL (all the other functions, apart from `COALESCE`, short-circuit to `null` when one of the values is null), so let's discuss this behavior.~ [EDIT] considering the feedback from Andrei, I changed this logic and made it consistent with the other functions: now if one of the parameters is null, the function returns null
14 lines
385 B
Text
Generated
14 lines
385 B
Text
Generated
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
|
|
[discrete]
|
|
[[esql-mv_append]]
|
|
=== `MV_APPEND`
|
|
|
|
*Syntax*
|
|
|
|
[.text-center]
|
|
image::esql/functions/signature/mv_append.svg[Embedded,opts=inline]
|
|
|
|
include::../parameters/mv_append.asciidoc[]
|
|
include::../description/mv_append.asciidoc[]
|
|
include::../types/mv_append.asciidoc[]
|