-
Notifications
You must be signed in to change notification settings - Fork 25.2k
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
base: main
Are you sure you want to change the base?
ESQL: Keep DROP
attributes when resolving field names
#127009
Conversation
DROP
attributes when resolving field names
DROP
attributes when resolving field namesDROP
attributes when resolving field names
…ng-field-names # Conflicts: # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java
Pinging @elastic/es-analytical-engine (Team:Analytics) |
@kanoshiou thank you for looking into this issue and preparing a PR.
How is this different from the query that you use as a test in this PR (I am looking for a deep analysis explanation)? Also, in this PR you are manipulating the content of
This specific change (which doesn't seem quite right and fit) combined with the fact that there is an already very similar passing test leads me to question this solution as being the best (I am not arguing it's not fixing the issue, though). |
Thank you for reviewing @astefan ! For query:
The significant difference compared to the query you mentioned earlier is the alias created by When processing the plan:
The attribute elasticsearch/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/EsqlSession.java Lines 658 to 665 in 1a8dadc
You are correct that adding a |
…ng-field-names # Conflicts: # x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/generative/GenerativeRestTest.java
For the following query:
During field name resolution, the attribute
*name
is removed because the aliasfirst_name
, defined ineval first_name = 1
, matches the regex pattern. However, this behavior is incorrect, as other fields matching the regex pattern may also exist.Closes #126418