Skip to content

Conversation

@astefan
Copy link
Contributor

@astefan astefan commented Oct 23, 2025

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

it comes to multi-valued constants (literals): they should emit
a warning header, a contract set in place in the compute engine
Evaluators.
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Oct 23, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine
Copy link
Collaborator

Hi @astefan, I've created a changelog YAML for you.

Comment on lines +125 to +126
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
Copy link
Contributor Author

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.

Copy link
Contributor

@luigidellaquila luigidellaquila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @astefan!

Copy link
Contributor

@bpintea bpintea left a 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].

@astefan astefan added auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) auto-backport Automatically create backport pull requests when merged labels Oct 24, 2025
@elasticsearchmachine elasticsearchmachine merged commit 4e2b416 into elastic:main Oct 24, 2025
34 checks passed
@astefan astefan deleted the 136998_fix branch October 24, 2025 14:45
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
9.2

astefan added a commit to astefan/elasticsearch that referenced this pull request Oct 24, 2025
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
@astefan
Copy link
Contributor Author

astefan commented Oct 24, 2025

This fixes the issues, but do we need to propagate the same to EsqlBinaryComparison#translatable? Thinking of things like field > [1, 2].

@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.

elasticsearchmachine pushed a commit that referenced this pull request Oct 24, 2025
…7110)

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.2.1 v9.3.0

Projects

None yet

4 participants