ESQL: Should MV_APPEND return null if any value is null? #121286
Labels
:Analytics/ES|QL
AKA ESQL
>bug
>docs
General docs changes
Team:Analytics
Meta label for analytical engine team (ESQL/Aggs/Geo)
Team:Docs
Meta label for docs team
team-discuss
This behavior is undocumented and I wonder if it's even useful. As a user, I expected
MV_APPEND
to return the left hand side multi-value rather than null, i.e.z = [1,2]
.This is particularly tricky because we'd like to enhance
MV_APPEND
's behavior to take an arbitrary amount of arguments in #114436.If I wanted to append multiple multivalues into a single one, simply skipping null values, there won't be a good way to achieve this. For just 2 arguments, one can work around this via
CASE
, but even that is not very ergonomic.We should either make
MV_APPEND
an exception where onenull
value doesn't make us returnnull
overall; or we should clearly document the behavior, including examples from our csv tests.The text was updated successfully, but these errors were encountered: