-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EQL: null handling in ES EQL #54419
Comments
Pinging @elastic/es-ql (:Query Languages/EQL) |
A valid scenario that needs a solution: |
Another interesting scenario - the Update: this is no longer the case, similar with |
|
I think we can close this with #54544, since all of the null handling should be consistent now. |
EQL treats a non-existent value (that can be associated with a
null
to some degree) in a "lenient" way. For example,length
will return0
if there is an empty string or non-existent string. Shouldlength
returnnull
instead of 0?A more interesting scenario is the one of functions that return a boolean value (
startsWith
is one of them) that receive anull
parameter? Should they returnnull
or atrue
/false
value?From #53999:
The above suggestion does bring forth another scenario: functions dealing with data types they are not supposed to deal with - should the function return
null
or a "lenient" value (like 0 in the case oflength(integer)
for example) or throw an exception?I created this issue to open discussion and reach a conclusion about "null" handling (both as parameters and as a return value) in ES EQL:
null
parameters should returnnull
or a default value depending on the function?null
should probably be accompanied by the introduction of a new function, that should check for anull
value. Otherwise, thenull
output of functions will not be useful in queriesThe text was updated successfully, but these errors were encountered: