_score should not be a reserved attribute in ES|QL #118435
_score should not be a reserved attribute in ES|QL #118435tteofili merged 12 commits intoelastic:mainfrom
_score should not be a reserved attribute in ES|QL #118435Conversation
|
Documentation preview: |
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
|
Hi @tteofili, I've created a changelog YAML for you. |
ioanatia
left a comment
There was a problem hiding this comment.
The changes look right with me!
Can we get a CSV test just to prevent any future regressions with allowing _score to be overwritten?
Something like what you had in the test before: "from foo metadata _score | where qstr(\"bar\") | eval _score = _score + 1"
and another one where _score receives a different type:
from foo metadata _score | where qstr(\"bar\") | eval _score = "foobar"
with that, I think this should be good to go!
|
also what would happen if |
I did not realize this would actually create a problem for bwc 8.18 tests - feel free to remove them and then we can add them later after the changes make it in 8.18.
|
|
Hi @tteofili, I've updated the changelog YAML for you. |
💔 Backport failed
You can use sqren/backport to manually backport by running |
| - class: "org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT" | ||
| method: "test {scoring.*}" | ||
| issue: https://github.com/elastic/elasticsearch/issues/117641 | ||
| - class: "org.elasticsearch.xpack.esql.qa.mixed.MultilusterEsqlSpecIT" |
There was a problem hiding this comment.
there is a typo here - also looks like a duplicate with the previous muted test (line 180)
(cherry picked from commit 7573312)
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
…elastic#118568) (cherry picked from commit 7573312)
…elastic#118568) (cherry picked from commit 7573312)
Drop checks in ES|QL
Verifierthat ensured_scoreis a reserved attribute.These checks are too restrictive, in addition to that relaxing them would make handling of
_scoreconsistent with other (metadata) attributes and fields.fixes #118460