Skip to content

Conversation

@luigidellaquila
Copy link
Contributor

Fixes: #121740

Fix validation of ENRICH with usage of (unsupported) wildcards in field names, eg.

... | enrich my-policy with x = * 

@elasticsearchmachine elasticsearchmachine added Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.1.0 labels Feb 6, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

Hi @luigidellaquila, I've created a changelog YAML for you.

if (ne instanceof UnresolvedNamePattern || ne instanceof UnresolvedStar) {
var src = ne.source();
throw new ParsingException(src, "Using wildcards [*] in ENRICH WITH projections is not allowed [{}]", up.pattern());
throw new ParsingException(src, "Using wildcards [*] in ENRICH WITH projections is not allowed [{}]", src.text());
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
throw new ParsingException(src, "Using wildcards [*] in ENRICH WITH projections is not allowed [{}]", src.text());
throw new ParsingException(src, "Using wildcards [*] in ENRICH WITH projections is not allowed, found [{}]", src.text());

Copy link
Contributor

@astefan astefan left a comment

Choose a reason for hiding this comment

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

LGTM. Left one minor styling comment.

@luigidellaquila luigidellaquila enabled auto-merge (squash) February 7, 2025 09:29
@luigidellaquila
Copy link
Contributor Author

Thanks folks!

@luigidellaquila luigidellaquila merged commit c7ad022 into elastic:main Feb 7, 2025
17 checks passed
luigidellaquila added a commit to luigidellaquila/elasticsearch that referenced this pull request Feb 7, 2025
luigidellaquila added a commit to luigidellaquila/elasticsearch that referenced this pull request Feb 7, 2025
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
9.0
8.18
8.x
8.16
8.17

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 >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.16.5 v8.17.3 v8.18.0 v8.18.1 v8.19.0 v9.0.0 v9.0.1 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ESQL: ENRICH throws 500 when wildcard is used in the WITH clause

4 participants