mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-29 09:54:06 -04:00
Fixed the inconsistencies regarding NULL argument handling.
NULL literal vs NULL field value as function arguments in some case
resulted in different function return values.
Functions should return with the same value no matter if the argument(s)
came from a field or from a literal.
The introduced integration test tests if function calls with same
argument values (regardless of literal/field) will return with the
same output (also checks if newly added functions are added to the
testcases).
Fixed the following functions:
* Insert: NULL start, length and replacement arguments (as fields) also
result in NULL return value instead of returning the input.
* Locate: NULL pattern results in NULL return value, NULL optional start
argument handled the same as missing start argument
* Replace: NULL pattern and replacement results in NULL instead of
returning the input
* Substring: NULL start or length results in NULL instead of returning
the input
Fixes #58907
(cherry-pick from
|
||
---|---|---|
.. | ||
aggs.asciidoc | ||
conditional.asciidoc | ||
date-time.asciidoc | ||
geo.asciidoc | ||
grouping.asciidoc | ||
index.asciidoc | ||
like-rlike.asciidoc | ||
math.asciidoc | ||
operators.asciidoc | ||
search.asciidoc | ||
string.asciidoc | ||
system.asciidoc | ||
type-conversion.asciidoc |