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

Implement count distinct for dictionary arrays #256

Merged
merged 4 commits into from
May 6, 2021

Conversation

alamb
Copy link
Contributor

@alamb alamb commented May 4, 2021

Which issue does this PR close?

Closes #249

Rationale for this change

I have dictionary encoded data that I want to be able to compute distinct counts

What changes are included in this PR?

This implementation has the the basic "get it working" version. A more optimized implementation (e.g. only looking at the dictionary contents) is left for a subsequent PR and #258 tracks better performance

Are there any user-facing changes?

queries like select count(distinct tag_col) from ... are now supported when tag_col is a dictionary encoded column

@alamb alamb added the datafusion Changes in the datafusion crate label May 4, 2021
Copy link
Contributor

@Dandandan Dandandan left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@alamb alamb merged commit 27be271 into apache:master May 6, 2021
@alamb alamb deleted the alamb/distinct_dict branch May 6, 2021 18:14
@houqp houqp added the enhancement New feature or request label Jul 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datafusion Changes in the datafusion crate enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

COUNT DISTINCT does not support dictionary types
3 participants