apache / datafusion

Apache DataFusion SQL Query Engine
https://datafusion.apache.org/
Apache License 2.0
5.93k stars 1.12k forks source link

Better aggregate support for StringViewArray #11418

Open XiangpengHao opened 2 months ago

XiangpengHao commented 2 months ago

Is your feature request related to a problem or challenge?

Current aggregate makes a special case for Utf8/LargeUtf8 that does not go through the arrow-row format. https://github.com/apache/datafusion/blob/string-view/datafusion/physical-plan/src/aggregates/group_values/mod.rs#L70C4-L81

We should do this to Utf8View/BinaryView as well.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

XiangpengHao commented 2 months ago

take

alamb commented 2 months ago

👍 it will probably be a lot simpler for StringView actually (the GroupValuesBytes takes a lot of inspiration from StringView ...)