Skip to content

ESQL: Keep DROP attributes when resolving field names #127009

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

kanoshiou
Copy link
Contributor

For the following query:

from test 
| eval first_name = 1 
| drop first_name 
| drop *name 
| keep gender

During field name resolution, the attribute *name is removed because the alias first_name, defined in eval first_name = 1, matches the regex pattern. However, this behavior is incorrect, as other fields matching the regex pattern may also exist.

Closes #126418

@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label v9.1.0 external-contributor Pull request authored by a developer outside the Elasticsearch team labels Apr 17, 2025
@kanoshiou kanoshiou changed the title Keep drop attributes when resolving field names ESQL: KeepDROP attributes when resolving field names Apr 17, 2025
@kanoshiou kanoshiou changed the title ESQL: KeepDROP attributes when resolving field names ESQL: Keep DROP attributes when resolving field names Apr 17, 2025
…ng-field-names

# Conflicts:
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-contributor Pull request authored by a developer outside the Elasticsearch team needs:triage Requires assignment of a team area label v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ES|QL: no matches for pattern
2 participants