Skip to content

QL: "fields" api implementation in QL #68802

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

Merged
merged 6 commits into from
Feb 10, 2021
Merged

Conversation

astefan
Copy link
Contributor

@astefan astefan commented Feb 10, 2021

This code change achieves witching from using docvalue_fields and _source extraction to using the fields API. It helps simplify the QL code, but does also come with a small drawback which will become visible in FieldHitExtractorTests where some tests are not needed anymore. Any query (especially SQL) on fields that have _source disabled, but are indexed (accessible through docvalue_fields), will not be possible anymore.

This PR, also, improves bwc checks when it comes to running queries in a mixed-versions cluster (a rolling upgrade scenario) by using a minimum compatibility version when creating a search request against ES and re-trying the request if the search proves to be executed on at least one incompatible shard. The retrial happens on a node that has an older version, the original request (SQL/EQL request) being sent through transport layer. The node receiving the retried request will re-parse it and create another query DSL to be sent to ES.

Addresses #67727.
PRs in this merge:
#68467
#68602
#68745

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-ql (Team:QL)

1 similar comment
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-ql (Team:QL)

@astefan astefan merged commit ee5cc54 into master Feb 10, 2021
@astefan astefan deleted the ql_fields_api_implementation branch February 10, 2021 09:17
astefan added a commit to astefan/elasticsearch that referenced this pull request Feb 10, 2021
* Integrate "fields" API into QL (elastic#68467)
* QL: retry SQL and EQL requests in a mixed-node (rolling upgrade) cluster (elastic#68602)
* Adapt nested fields extraction from "fields" API output to the new un-flattened structure (elastic#68745)

(cherry picked from commit ee5cc54)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants