elasticsearch/docs/reference/sql/functions
Andras Palinkas a3dbdae2ef
SQL: Test and fix the NULL handling of the String functions (#68379)
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
2021-02-05 12:30:37 -05:00
..
aggs.asciidoc SQL: Add method args to PERCENTILE/PERCENTILE_RANK (#65026) 2020-11-24 14:17:56 -05:00
conditional.asciidoc SQL: document the use of a filter on _routing (#52355) 2020-02-14 18:58:45 +02:00
date-time.asciidoc QL: Implement support for date_nanos ES type. (#67666) 2021-01-29 11:07:29 +01:00
geo.asciidoc SQL: document the use of a filter on _routing (#52355) 2020-02-14 18:58:45 +02:00
grouping.asciidoc SQL: Use calendar_interval of 1d for HISTOGRAMs with 1 DAY intervals (#52749) 2020-02-25 17:33:36 +02:00
index.asciidoc SQL: Implement TO_CHAR() function (#66486) 2021-01-20 18:32:10 -05:00
like-rlike.asciidoc SQL: Escaped wildcard (*) not accepted in LIKE (#63428) 2020-10-13 09:38:35 -04:00
math.asciidoc [DOCS] Replace Wikipedia links with attribute (#61171) 2020-08-17 09:44:24 -04:00
operators.asciidoc [DOCS] Remove unneeded options from [source,sql] code blocks (#42759) 2019-05-31 13:03:41 -04:00
search.asciidoc SQL: document the use of a filter on _routing (#52355) 2020-02-14 18:58:45 +02:00
string.asciidoc SQL: Test and fix the NULL handling of the String functions (#68379) 2021-02-05 12:30:37 -05:00
system.asciidoc SQL: document the use of a filter on _routing (#52355) 2020-02-14 18:58:45 +02:00
type-conversion.asciidoc SQL: document the use of a filter on _routing (#52355) 2020-02-14 18:58:45 +02:00