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
ESQL: Use exact attributes for data source extraction #99874
Conversation
Pinging @elastic/es-ql (Team:QL) |
Pinging @elastic/elasticsearch-esql (:Query Languages/ES|QL) |
Hi @luigidellaquila, I've created a changelog YAML for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The PR looks good, but:
|
Thank you for checking it @astefan
The problem is very specific to the situation with synthetic source, a
There is a generic problem with exact fields in QL: Even if I try to extract information from EsField.getProperties(), I'll still not have enough information to give the user correct suggestions. None of the subfields could be a valid one if all of them have a different content than the original field; a query like I still have doubts about that message |
agreed I know this scenario is very open ended and I hope we can discuss this in a wider audience. Please, open an issue about improving the way we deal with exact variants of non-exact fields, plus the warning vs. error message aspect and link it to this PR. |
Done #99899 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #99183
ValueSources will now use exact attributes (ie. exact subfields) when available.
This will make the extraction faster (eg. using a KEYWORD subfield instead of loading a TEXT value from _source) and will avoid failures in case the original field is not available at all, eg. in case of synthetic source.