Rich-T-kid opened a new issue, #24730:
URL: https://github.com/apache/datafusion/issues/24730
### Is your feature request related to a problem or challenge?
approx_distinct returns a not implemented error when the input column has a
Dictionary type (e.g. Dictionary(Int32, Utf8)), which is common for
low-cardinality string columns stored in Parquet or produced by joins/filters.
**Today**
`SELECT approx_distinct(dict_col) FROM t;`
` Error: Support for 'approx_distinct' for data type Dictionary(Int32, Utf8)
is not implemented`
### Describe the solution you'd like
`approx_distinct` uses create_hashes internally (via `HLLAccumulator` and
`HllGroupsAccumulator`), which already handles Dictionary arrays correctly by
hashing the logical decoded values. The fix is to route `Dictionary(_, _)` to
HLLAccumulator
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]