Skip to content

Handle dicts for distinct count #15871

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

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

blaginin
Copy link
Contributor

Which issue does this PR close?

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the functions Changes to functions implementation label Apr 27, 2025
@github-actions github-actions bot added the core Core DataFusion crate label May 6, 2025
@github-actions github-actions bot removed the core Core DataFusion crate label May 8, 2025
@blaginin
Copy link
Contributor Author

blaginin commented May 8, 2025

group                                              main                                   pr
-----                                              ----                                   --
count low cardinality dict 20% nulls, no filter    50.55    12.2±0.39ms        ? ?/sec    1.00  240.9±327.44µs        ? ?/sec

🚀

@blaginin blaginin self-assigned this May 8, 2025
@@ -764,4 +774,49 @@ mod tests {
assert_eq!(accumulator.evaluate()?, ScalarValue::Int64(Some(0)));
Ok(())
}

#[test]
fn test_nested_dictionary() -> Result<()> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Worried about edge cases like dict of dicts, dict of lists, etc., but couldn't come up with anything that breaks the function. Happy to be challenged 🙏

@blaginin blaginin requested a review from Dandandan May 8, 2025 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
functions Changes to functions implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve performance of COUNT (distinct x) for dictionary columns
1 participant