-
Notifications
You must be signed in to change notification settings - Fork 25.2k
ESQL: Enable physical plan verification #118114
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 all commits
b120d92
bd2b951
a593154
2d1d64d
54feea5
99e8c67
23bef65
d606baf
d3b3dc6
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: 118114 | ||
summary: Enable physical plan verification | ||
area: ES|QL | ||
type: enhancement | ||
issues: [] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,9 +93,9 @@ public List<Attribute> addedFields() { | |
public List<Attribute> output() { | ||
if (lazyOutput == null) { | ||
lazyOutput = new ArrayList<>(left().output()); | ||
for (Attribute attr : addedFields) { | ||
lazyOutput.add(attr); | ||
} | ||
var addedFieldsNames = addedFields.stream().map(Attribute::name).toList(); | ||
lazyOutput.removeIf(a -> addedFieldsNames.contains(a.name())); | ||
lazyOutput.addAll(addedFields); | ||
Comment on lines
+96
to
+98
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, this is very interesting. Thanks for catching this. I'm wondering if enforcing unique names for In PhysicalPlan land, this output method was technically correct, because it represented exactly what the physical operators will do: they're gonna append the blocks for the added fields to the pages that are processed. The blocks corresponding to shadowed attributes/channels will not be stripped from incoming pages. This means that the output layout technically has duplicate attribute names. This change just hides them and makes them inaccessible during the physical planning stage. FWIW, |
||
} | ||
return lazyOutput; | ||
} | ||
|
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.
Much better.