Skip to content

Conversation

@kanoshiou
Copy link
Contributor

@kanoshiou kanoshiou commented Oct 20, 2025

Previously, when pushing down filters to the right side of a lookup join, we used simple equality (contains) to check for duplicate filters. This could result in semantically equivalent filters being added multiple times if they were different object instances.

This commit changes the duplicate check to use semanticEquals() instead, ensuring that filters with the same semantic meaning are properly deduplicated regardless of object identity.

Closes #136599

@elasticsearchmachine elasticsearchmachine added v9.3.0 needs:triage Requires assignment of a team area label external-contributor Pull request authored by a developer outside the Elasticsearch team labels Oct 20, 2025
@szybia szybia added :Analytics/ES|QL AKA ESQL and removed needs:triage Requires assignment of a team area label labels Oct 20, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Oct 20, 2025
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Contributor

@alex-spies alex-spies left a comment

Choose a reason for hiding this comment

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

This is great, thanks @kanoshiou !

Cc @julian-elastic , it's interesting to run the test query and see why this bug happened on current main.

I think we should also backport this to 9.2.

@alex-spies alex-spies added auto-backport Automatically create backport pull requests when merged v9.2.1 labels Oct 22, 2025
@alex-spies alex-spies self-assigned this Oct 22, 2025
@alex-spies
Copy link
Contributor

@elasticsearchmachine test this please

@alex-spies alex-spies added auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) >bug labels Oct 22, 2025
@alex-spies
Copy link
Contributor

@elasticsearchmachine test this please

@elasticsearchmachine elasticsearchmachine merged commit f54987f into elastic:main Oct 22, 2025
35 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
9.2 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 136818

@alex-spies
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
9.2

Questions ?

Please refer to the Backport tool documentation

alex-spies pushed a commit to alex-spies/elasticsearch that referenced this pull request Oct 23, 2025
…ic#136818) Previously, when pushing down filters to the right side of a lookup join, we used simple equality (contains) to check for duplicate filters. This could result in semantically equivalent filters being added multiple times if they were different object instances. This commit changes the duplicate check to use `semanticEquals()` instead, ensuring that filters with the same semantic meaning are properly deduplicated regardless of object identity. Closes elastic#136599 (cherry picked from commit f54987f) # Conflicts: #	x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/generative/GenerativeRestTest.java #	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java
elasticsearchmachine pushed a commit that referenced this pull request Oct 23, 2025
…) (#136999) Previously, when pushing down filters to the right side of a lookup join, we used simple equality (contains) to check for duplicate filters. This could result in semantically equivalent filters being added multiple times if they were different object instances. This commit changes the duplicate check to use `semanticEquals()` instead, ensuring that filters with the same semantic meaning are properly deduplicated regardless of object identity. Closes #136599 (cherry picked from commit f54987f) # Conflicts: #	x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/generative/GenerativeRestTest.java #	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java Co-authored-by: kanoshiou <uiaao@tuta.io>
fzowl pushed a commit to voyage-ai/elasticsearch that referenced this pull request Nov 3, 2025
…ic#136818) Previously, when pushing down filters to the right side of a lookup join, we used simple equality (contains) to check for duplicate filters. This could result in semantically equivalent filters being added multiple times if they were different object instances. This commit changes the duplicate check to use `semanticEquals()` instead, ensuring that filters with the same semantic meaning are properly deduplicated regardless of object identity. Closes elastic#136599
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!) backport pending >bug external-contributor Pull request authored by a developer outside the Elasticsearch team Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.2.1 v9.3.0

4 participants