ESQL: Keep DROP attributes when resolving field names#127009
ESQL: Keep DROP attributes when resolving field names#127009astefan merged 16 commits intoelastic:mainfrom
DROP attributes when resolving field names#127009Conversation
…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
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
…keep-drop-attributes-when-resolving-field-names
|
buildkite test this |
|
@kanoshiou your solution LGTM. |
|
buildkite test this |
|
buildkite test this |
1 similar comment
|
buildkite test this |
|
buildkite test this |
1 similar comment
|
buildkite test this |
💔 Backport failed
You can use sqren/backport to manually backport by running |
(cherry picked from commit 54f2668)
(cherry picked from commit 54f2668)
|
@astefan , since this was backported to 9.0, shouldn't we also backport to 8.18? |
) * ESQL: Keep `DROP` attributes when resolving field names (#127009) (#128147) (cherry picked from commit 54f2668) Co-authored-by: kanoshiou <73424326+kanoshiou@users.noreply.github.com> * [CI] Auto commit changes from spotless --------- Co-authored-by: kanoshiou <73424326+kanoshiou@users.noreply.github.com> Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
|
@alex-spies done. |
For the following query:
During field name resolution, the attribute
*nameis 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