We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
These two queries should return the same result, as id is unique values
id
SELECT COUNT(*) FROM (SELECT DISTINCT id FROM $planets) AS S
SELECT COUNT(*) FROM (SELECT id FROM $planets) AS S
but the inclusion of DISTINCT in the first query causes the result to be incorrect.
DISTINCT
The text was updated successfully, but these errors were encountered:
The problem appears to be the projection pushdown and count(*) optimizations.
Because count(*) doesn't reference any columns when we remove the subquery we don't reference any of the inner columns.
What we need to do is ensure the distinct explicitly references the columns so that the projection pushdown doesn't eliminate them.
Currently the reference to columns by distinct is implied, it references all of them.
Sorry, something went wrong.
9b8bc15
joocer
Successfully merging a pull request may close this issue.
These two queries should return the same result, as
id
is unique valuesbut the inclusion of
DISTINCT
in the first query causes the result to be incorrect.The text was updated successfully, but these errors were encountered: