Skip to content
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

SQL: use hasValue() methods from Elasticsearch's InspectionHelper classes #44745

Merged
merged 2 commits into from
Jul 24, 2019

Conversation

astefan
Copy link
Contributor

@astefan astefan commented Jul 23, 2019

This is part of #35745.

Until #36020 was merged, we were deciding based on the internals of various aggregation classes if a certain aggregation worked on some documents and came up with an aggregated value or there were no documents to act on. This is relevant to SQL in order to return null or that specific value.

This PR updates ES SQL's usage of the aggregation classes by using their own logic to decide if it should return null or not.

if the aggregations should return null (in case there is no value) or
the value itself.
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

Copy link
Contributor

@matriv matriv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@astefan astefan merged commit dafd7b0 into elastic:master Jul 24, 2019
@astefan astefan deleted the agg_hasValue_update branch July 24, 2019 12:55
astefan added a commit that referenced this pull request Jul 24, 2019
Use InspectionHelper classes to decide if the aggregations should return null (in case there is no value) or the value itself.

(cherry picked from commit dafd7b0)
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.

4 participants