ESQL: Make equals include ids for Alias, TypedAttribute#132455
Merged
elasticsearchmachine merged 45 commits intoelastic:mainfrom Oct 22, 2025
Merged
ESQL: Make equals include ids for Alias, TypedAttribute#132455elasticsearchmachine merged 45 commits intoelastic:mainfrom
elasticsearchmachine merged 45 commits intoelastic:mainfrom
Conversation
alex-spies
commented
Aug 5, 2025
Contributor
Author
alex-spies
left a comment
There was a problem hiding this comment.
We probably also want to update the hashCode implementations, although this will mostly lead to a reduction of collisions.
fffe752 to
a707bec
Compare
Except EmptyAttribute
Just re-use the name ids, that prevents having to address that they may be mapped differently in the deserialized plan.
Don't even walk the plan to collect name ids, that's silly.
UnresolvedAttribute's ids specifically shouldn't matter here.
Collaborator
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Collaborator
|
Hi @alex-spies, I've created a changelog YAML for you. |
Collaborator
💔 Backport failed
You can use sqren/backport to manually backport by running |
Contributor
Author
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
alex-spies
added a commit
to alex-spies/elasticsearch
that referenced
this pull request
Oct 22, 2025
Fix elastic#131509 Fix elastic#132634 Make `Attribute#equals` and `Alias#equals` respect the `NameId`s, so that plan transformations that happen to replace an attribute/alias by one that only differs by id, we still actually update the plan rather than keeping the old plan object. This requires a bunch of boilerplate-y test updates. I'll point to the non-boilerplate changes in comments below. (cherry picked from commit f7d4422) # Conflicts: # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java # x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/parser/StatementParserTests.java
elasticsearchmachine
pushed a commit
that referenced
this pull request
Oct 22, 2025
… (#136950) * ESQL: Make equals include ids for Alias, TypedAttribute (#132455) Fix #131509 Fix #132634 Make `Attribute#equals` and `Alias#equals` respect the `NameId`s, so that plan transformations that happen to replace an attribute/alias by one that only differs by id, we still actually update the plan rather than keeping the old plan object. This requires a bunch of boilerplate-y test updates. I'll point to the non-boilerplate changes in comments below. (cherry picked from commit f7d4422) # Conflicts: # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java # x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/parser/StatementParserTests.java * Fix id ignoring matcher for UsingJoinType
fzowl
pushed a commit
to voyage-ai/elasticsearch
that referenced
this pull request
Nov 3, 2025
Fix elastic#131509 Fix elastic#132634 Make `Attribute#equals` and `Alias#equals` respect the `NameId`s, so that plan transformations that happen to replace an attribute/alias by one that only differs by id, we still actually update the plan rather than keeping the old plan object. This requires a bunch of boilerplate-y test updates. I'll point to the non-boilerplate changes in comments below.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #131509
Fix #132634
Make
Attribute#equalsandAlias#equalsrespect theNameIds, so that plan transformations that happen to replace an attribute/alias by one that only differs by id, we still actually update the plan rather than keeping the old plan object.This requires a bunch of boilerplate-y test updates. I'll point to the non-boilerplate changes in comments below.