-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[ESQL] Catch-and-rethrow TooComplexToDeterminizeException #137024
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] Catch-and-rethrow TooComplexToDeterminizeException #137024
Conversation
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
|
Hi @MattAlp, I've created a changelog YAML for you. |
| @@ -1354,8 +1333,15 @@ public void testLikeRLike() { | |||
| ); | |||
| } | |||
|
|
|||
| public void testIdentifierPatternTooComplex() { | |||
| // It is incredibly unlikely that we will see this limit hit in practice | |||
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 question if we really want to test for this, but it doesn't hurt to leave it in.
not-napoleon
left a comment
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.
This looks good to me. As discussed on slack, we should backport this as it is a bug fix. Thanks for fielding it!
|
If anyone has thoughts on the error string passed back to the user, please weigh in. The current one is good enough, but not great. |
nik9000
left a comment
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.
bpintea
left a comment
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.
Might be worth adding a method to do this exception conversion (that maybe just gets a Runnable?), so that we have it "centralised", though not sure if it'll make things clearer.
|
@bpintea I had considered a functional interface / runnable handler for this, but after writing one I felt that this would make more sense until we have a reason to have centralized logic. |
💔 Backport failedThe backport operation could not be completed due to the following error: You can use sqren/backport to manually backport by running |
…ic#137024) --------- Co-authored-by: elasticsearchmachine <[email protected]>
…ic#137024) --------- Co-authored-by: elasticsearchmachine <[email protected]>

Addresses #133676 in ESQL-specific locations; patches wildcard parsing of field names and regex predicates (
AbstractStringPatternimplementations). This is more ESQL-specific than wrapping all 30-something instances ofOperations.determinize()across this repo intry/catchblocks.It's also worth noting that the classes affected by 938d429 were originally pulled in from
org.elasticsearch.xpack.ql.expression.predicate.regexand we may want to apply similar changes there as part of this PR.