Skip to content

Conversation

@MattAlp
Copy link
Contributor

@MattAlp MattAlp commented Oct 23, 2025

Addresses #133676 in ESQL-specific locations; patches wildcard parsing of field names and regex predicates (AbstractStringPattern implementations). This is more ESQL-specific than wrapping all 30-something instances of Operations.determinize() across this repo in try/catch blocks.

It's also worth noting that the classes affected by 938d429 were originally pulled in from org.elasticsearch.xpack.ql.expression.predicate.regex and we may want to apply similar changes there as part of this PR.

@MattAlp MattAlp requested a review from not-napoleon October 23, 2025 12:43
@elasticsearchmachine elasticsearchmachine added Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.3.0 labels Oct 23, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine
Copy link
Collaborator

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
Copy link
Contributor Author

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.

@MattAlp MattAlp added the auto-backport Automatically create backport pull requests when merged label Oct 23, 2025
Copy link
Member

@not-napoleon not-napoleon left a 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!

@MattAlp
Copy link
Contributor Author

MattAlp commented Oct 23, 2025

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.

Copy link
Member

@nik9000 nik9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My general view using exceptions for error reporting is "they are convenient but the spooky action at a distance nature makes me want integration tests."

image add a single yaml test that asserts that the error is 400 and has a decent message?

Copy link
Contributor

@bpintea bpintea left a 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.

@MattAlp
Copy link
Contributor Author

MattAlp commented Oct 24, 2025

@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.

@MattAlp MattAlp merged commit c0342b0 into elastic:main Oct 26, 2025
33 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

The backport operation could not be completed due to the following error:

There are no branches to backport to. Aborting.

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 137024

shmuelhanoch pushed a commit to shmuelhanoch/elasticsearch that referenced this pull request Oct 27, 2025
@MattAlp MattAlp changed the title Catch-and-rethrow TooComplexToDeterminizeException within ESQL [ESQL] Catch-and-rethrow TooComplexToDeterminizeException Oct 30, 2025
fzowl pushed a commit to voyage-ai/elasticsearch that referenced this pull request Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged backport pending >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) Team:ES|QL v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants