-
Notifications
You must be signed in to change notification settings - Fork 25.6k
ESQL: Reuse child outputSet inside the plan where possible #124611
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
Changes from 2 commits
fa5f2a8
da09472
7bc1dbc
172f73e
ca48602
f844805
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| pr: 124611 | ||
| summary: Reuse child `outputSet` inside the plan where possible | ||
| area: ES|QL | ||
| type: enhancement | ||
| issues: [] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ | |
| package org.elasticsearch.xpack.esql.plan.logical; | ||
|
|
||
| import org.elasticsearch.xpack.esql.core.expression.Attribute; | ||
| import org.elasticsearch.xpack.esql.core.expression.AttributeSet; | ||
| import org.elasticsearch.xpack.esql.core.tree.Source; | ||
|
|
||
| import java.util.Collections; | ||
|
|
@@ -42,6 +43,11 @@ public List<Attribute> output() { | |
| return child.output(); | ||
| } | ||
|
|
||
| @Override | ||
| public AttributeSet outputSet() { | ||
| return child().outputSet(); | ||
| } | ||
|
|
||
|
||
| @Override | ||
| public int hashCode() { | ||
| return Objects.hashCode(child()); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ | |
| import org.elasticsearch.common.io.stream.StreamInput; | ||
| import org.elasticsearch.common.io.stream.StreamOutput; | ||
| import org.elasticsearch.xpack.esql.core.expression.Attribute; | ||
| import org.elasticsearch.xpack.esql.core.expression.AttributeSet; | ||
| import org.elasticsearch.xpack.esql.core.expression.Expression; | ||
| import org.elasticsearch.xpack.esql.core.tree.NodeInfo; | ||
| import org.elasticsearch.xpack.esql.core.tree.Source; | ||
|
|
@@ -68,6 +69,11 @@ public List<Attribute> output() { | |
| return child().output(); | ||
| } | ||
|
||
|
|
||
| @Override | ||
| public AttributeSet outputSet() { | ||
| return child().outputSet(); | ||
| } | ||
|
|
||
| @Override | ||
| public int hashCode() { | ||
| return Objects.hash(condition, child()); | ||
|
|
||
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.
With a better default implementation of this in
UnaryPlan, this might be obsolete. Same goes for the corresponding overrides in the other classes.