ESQL: Added exception catching to aggregators#111829
Merged
ivancea merged 3 commits intoelastic:mainfrom Aug 21, 2024
Merged
Conversation
1 task
Collaborator
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
mark-vieira
approved these changes
Aug 13, 2024
Member
|
I'll have a look at this one tomorrow. It's going to take more brainpower than I have this afternoon. |
nik9000
approved these changes
Aug 20, 2024
Member
nik9000
left a comment
There was a problem hiding this comment.
LGTM.
Important bit for those following along: this isn't plugged in to any agg yet. We will fix sum to be fallible so overflows become null with a warning. But not yet. It's easy to fix the sum to do that now that we have this PR. BUT doing it in the backward compatible way is not simple. Thta's the magic.
| import org.elasticsearch.common.util.BitArray; | ||
| import org.elasticsearch.core.Releasables; | ||
|
|
||
| public class AbstractFallibleArrayState extends AbstractArrayState { |
cbuescher
pushed a commit
to cbuescher/elasticsearch
that referenced
this pull request
Sep 4, 2024
Add the `warnExceptions` capability to aggregators. Same as for evaluators. This requires: - Having a "Warnings-like" object in the compute module. I created a new class for that, temporarily - Added new "FaillibleState" objects, that hold a "failed" boolean/bitset to mark failed groups - Catching exceptions in all combine methods receiving a single group (Not catching in evaluateFinal/Intermediate, nor in combines that receive the full state) - Shortcircuiting operations if the group is in "failed" state - Having a third intermediate state: `values, seen, failed` Extracted from elastic#111639. Check it to see a use case
davidkyle
pushed a commit
to davidkyle/elasticsearch
that referenced
this pull request
Sep 5, 2024
Add the `warnExceptions` capability to aggregators. Same as for evaluators. This requires: - Having a "Warnings-like" object in the compute module. I created a new class for that, temporarily - Added new "FaillibleState" objects, that hold a "failed" boolean/bitset to mark failed groups - Catching exceptions in all combine methods receiving a single group (Not catching in evaluateFinal/Intermediate, nor in combines that receive the full state) - Shortcircuiting operations if the group is in "failed" state - Having a third intermediate state: `values, seen, failed` Extracted from elastic#111639. Check it to see a use case
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add the
warnExceptionscapability to aggregators. Same as for evaluators. This requires:values, seen, failedExtracted from #111639. Check it to see a use case