Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: Fix synthetic attribute pruning #111413
ESQL: Fix synthetic attribute pruning #111413
Changes from 7 commits
205dfad
1cabef2
54e0436
890701e
bb0c926
f22f3a1
dbc9199
741dbd7
9e4dab5
d78f073
9695190
c343812
c5e74be
ac2d6e4
54e1847
7db76d8
01d4c5f
5443fef
ddfdd2c
e7c212e
3c648b3
4f01e7c
ff8b72d
e4b258a
9ad9e1c
7ff1991
2eabfc2
f1b9b86
63c39a7
6028664
e193fb1
ac44b1b
41e9159
febb40f
93cf2cf
9dbd5ea
d4dc892
0505dc4
6f36f70
ec67cf2
259d93f
7849978
3582136
d1f55e3
776ed78
77431f6
7c3aaf5
e557eb4
cb69899
f65747d
a7b8715
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Synthetic attributes were skipped because we had to solve an NPE; IMHO this was not a correct long term fix, as it made heavy assumptions on where synthetic attributes are used.
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.
The main change; the way we collected all attributes that occurred and then removed generated attributes is fully abstracted away here.
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.
Isn't
drop
different here? It's usage is to capture what the query wants to remove from projections and, in essence, adrop
doesn't "live" too long, being transformed in a projection in the Analyzer.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.
True.
Drop
essentially is not a real logical plan node, it's an AST node. The same is true forLookup
andKeep
.We can have this throw
UnsupportedOperationException
instead; although I think returningreferences()
is correct, too; this contains theUnresolvedAttribute
s that this is trying to drop, excluding any wildcards.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.
Same remark - is this used elsewhere externally?
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.
Yup, in
EvalExec
!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.
Any reason why the methods across Eval and Aggregate don't have the same name? Something like doComputeReferences() or determineReferences(), etc... required is a misnomer in this context.
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.
I'll just overload
computeReferences
(andoutput
forAggregate
), that should be nice and consistent.