neilconway opened a new pull request, #21037: URL: https://github.com/apache/datafusion/pull/21037
## Which issue does this PR close? - Closes #21035. ## Rationale for this change We were making a defensive copy of every string and binary value as part of invoking HyperLogLog, but that is not necessary: HyperLogLog doesn't need owned types. This improves the performance of `approx_distinct` on string and binary values by 6x-7x. ## What changes are included in this PR? * Add benchmark for `approx_distinct` * Optimize `approx_distinct` to avoid unnecessary copies * Cleanup: remove spurious type parameter from `StringViewHLLAccumulator` (unused) ## Are these changes tested? Yes. ## Are there any user-facing changes? No. -- 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]
