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: COUNT DISTINCT returns 0 instead of NULL for no matching docs #50037

Merged
merged 2 commits into from
Dec 11, 2019

Conversation

astefan
Copy link
Contributor

@astefan astefan commented Dec 10, 2019

This PR reverts a small change that silently introduced a change in behavior for COUNT DISTINCT that made it return NULL for a query that was not matching any documents, instead of 0.

Fixes #50013.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/SQL)

Copy link
Member

@costin costin left a comment

Choose a reason for hiding this comment

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

LGTM

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 cb94731 into elastic:master Dec 11, 2019
@astefan astefan deleted the 50013_fix branch December 11, 2019 21:53
astefan added a commit that referenced this pull request Dec 11, 2019
astefan added a commit that referenced this pull request Dec 12, 2019
astefan added a commit that referenced this pull request Dec 12, 2019
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this pull request Jan 23, 2020
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.

COUNT DISTINCT for 0 matching documents return NULL
5 participants