-
Notifications
You must be signed in to change notification settings - Fork 25.6k
ESQL: Make equals include ids for Alias, TypedAttribute #132455
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
ESQL: Make equals include ids for Alias, TypedAttribute #132455
Conversation
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.
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.
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
|
Hi @alex-spies, I've created a changelog YAML for you. |
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!
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. Awesome!
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.
👏
💔 Backport failed
You can use sqren/backport to manually backport by running |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
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
… (#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
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.