ES|QL: Validate multiple GROK patterns individually#137082
Merged
luigidellaquila merged 3 commits intoelastic:mainfrom Oct 24, 2025
Merged
ES|QL: Validate multiple GROK patterns individually#137082luigidellaquila merged 3 commits intoelastic:mainfrom
luigidellaquila merged 3 commits intoelastic:mainfrom
Conversation
Collaborator
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Collaborator
|
Hi @luigidellaquila, I've created a changelog YAML for you. |
ncordon
reviewed
Oct 24, 2025
| expectError( | ||
| "row a = \"foo\" | GROK a \"(?P<justification>.+)\"", | ||
| "line 1:17: Invalid GROK pattern [(?P<justification>.+)]: [undefined group option]" | ||
| "line 1:24: Invalid GROK pattern [(?P<justification>.+)]: [undefined group option]" |
Contributor
There was a problem hiding this comment.
I see the position of the errors has changed because of having a different validation, do we care about that?
Contributor
Author
There was a problem hiding this comment.
That's intentional: before this change it pointed to the GROK command, now it points to the wrong pattern, so it's more precise.
ncordon
approved these changes
Oct 24, 2025
fzowl
pushed a commit
to voyage-ai/elasticsearch
that referenced
this pull request
Nov 3, 2025
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.
GROK now accepts multiple patterns, and composes them in a single one.
Due to the way the patterns a composed, the result could be a valid pattern, eve if single patterns are invalid.
This adds validation to the single patterns individually.
Relates to: #136750
The fix applies only to ES|QL as this is a new feature; ingest pipelines have the same problem, but it's been like that for years, so it should probably be managed separately, as a breaking change.