apache / apache/datafusion

Support more types for `approx_distinct` function

Open
#22,989 7 comments 0 reactions 1 assignee Claimed by @mkleen View on GitHub
enhancement
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

### Is your feature request related to a problem or challenge?

#22921 has refactored `approx_distinct` into a more generic implementation over different input types, now it's easy to support additional arg types. (Thanks to @Jefffrey for pointing it out in the review)

### Describe the solution you'd like

1. Identify the unsupported types
2. Plan them into the generic implementation of `Accumulator` and `GroupsAccumulator` (see #22921 for details)
3. Add `sqllogictest`s

Note we don't have to support all applicable types at once, some complex type might get tricky to test, so I prefer to do this incrementally

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.