-
Couldn't load subscription status.
- Fork 25.6k
ESQL: fix handling equality with MV constants properly #137032
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
Conversation
it comes to multi-valued constants (literals): they should emit a warning header, a contract set in place in the compute engine Evaluators.
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
|
Hi @astefan, I've created a changelog YAML for you. |
| warning:Line 3:9: evaluation of [x == [true, false]] failed, treating result as null. Only first 20 failures recorded. | ||
| warning:Line 3:9: java.lang.IllegalArgumentException: single-value function encountered multi-value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For anything other than text data types these warnings were missing, leading to an inconsistent handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @astefan!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the issues, but do we need to propagate the same to EsqlBinaryComparison#translatable? Thinking of things like field > [1, 2].
💚 Backport successful
|
Deal with equality (and implicitly the IN operator) properly when it comes to multi-valued constants (literals): they should emit a warning header, a contract set in place in the compute engine Evaluators. Fixes elastic#136998 Fixes elastic#136939
@bpintea I'll explore this as part of a different PR. From a preliminary evaluation, this will be a refactoring type of PR. EsqlBinaryComparisons in general are handled by the fix in this PR, but it should indeed be handled in EsqlBinaryComparisons. |
Deal with equality (and implicitly the IN operator) properly when it comes to multi-valued constants (literals): they should emit
a warning header, a contract set in place in the compute engine Evaluators.
Fixes #136998
Fixes #136939