-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
QL: Make UnaryPlan.replaceChild public and use it where appropriate #76071
Conversation
Pinging @elastic/es-ql (Team:QL) |
d20df3d
to
34e7c28
Compare
34e7c28
to
f7a0f90
Compare
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.
For some reason I was expecting this pattern to occur in more parts of the code.
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
Yes, so was I. Maybe people used slightly other approaches to achieve the same or I just came across it increasingly in the past weeks. And there is also one or the other open PR that uses the pattern as well. |
…76071) (#76154) Co-authored-by: Lukas Wegmann <[email protected]>
…76071) (#76155) Co-authored-by: Lukas Wegmann <[email protected]>
The
replaceChildrenSameSize(singletonList(...))
pattern is used more and more often but can easily be replaced byreplaceChild(...)
.This PR:
UnaryPlan.replaceChild
public (and all of its implementations)replaceChildrenSameSize(singletonList(...))
withreplaceChild(...)
where it can be done in a trivial transformation