Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.0.0
Description
Implement count distinct aggregate reusing hash table from hash group by inside of it.
This brings support to SQL queries like:
select a, count(distinct b), count(distinct c) from t group by a
For instance to compute count(distinct b), the first group id mapping will give group id based on column a value; then the second group id mapping is done using the key (groupid(a), b) inside count(distinct b) aggregate (similarly for count(distinct c)).
After all input rows are consumed, the final processing step scans the hash tables based on (groupid(a), b) and updates an array of counts indexed by groupid(a).
The resulting array of counts represents the output of count distinct aggregate.
Attachments
Issue Links
- is a child of
-
ARROW-12633 [C++] Query engine umbrella issue
- Open
-
ARROW-13339 [C++] Implement hash_aggregate kernels (umbrella issue)
- Open
- is depended upon by
-
ARROW-13620 [R] Binding for n_distinct()
- Resolved
- is related to
-
ARROW-14035 [C++][Compute] Implement non-hash count_distinct aggregate kernel
- Resolved
- links to