-
Notifications
You must be signed in to change notification settings - Fork 25.2k
ESQL: make AttributeMap
and AttributeSet
immutable
#125938
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
This will allow reusing them in the plan analysis and skip recreating them in UnaryPlan/UnaryExec.
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Hi @bpintea, 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 for looking into this!
@@ -249,7 +260,7 @@ public boolean isEmpty() { | |||
|
|||
@Override | |||
public boolean containsKey(Object key) { | |||
return key instanceof NamedExpression ne ? delegate.containsKey(new AttributeWrapper(ne.toAttribute())) : false; | |||
return key instanceof NamedExpression ne && delegate.containsKey(new AttributeWrapper(ne.toAttribute())); |
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.
👍
To keep the semantics in place, I would look into backporting this to 8.18, 8.19 and 9.0 as well - it will make maintenance a lot easier. |
💔 Backport failed
You can use sqren/backport to manually backport by running |
This will allow reusing them in the plan analysis and skip recreating them in UnaryPlan/UnaryExec when not needed. Introduce/adjust builders for them, which are now the only way to use a modifiable map/set. Related elastic#124395 (cherry picked from commit 2b512bc)
#126207) * ESQL: make `AttributeMap` and `AttributeSet` immutable (#125938) This will allow reusing them in the plan analysis and skip recreating them in UnaryPlan/UnaryExec when not needed. Introduce/adjust builders for them, which are now the only way to use a modifiable map/set. Related #124395 (cherry picked from commit 2b512bc) * Update 9.0-specific AttributeSet usage
This will allow reusing them in the plan analysis and skip recreating them in UnaryPlan/UnaryExec when not needed. Introduce/adjust builders for them, which are now the only way to use a modifiable map/set. Related elastic#124395 (cherry picked from commit 2b512bc)
This will allow reusing them in the plan analysis and skip recreating them in UnaryPlan/UnaryExec when not needed. Introduce/adjust builders for them, which are now the only way to use a modifiable map/set. Related elastic#124395
This will allow reusing them in the plan analysis and skip recreating them in
UnaryPlan
/UnaryExec
when not needed.Introduce/adjust builders for them, which are now the only way to use a modifiable map/set.
Related #124395