blaginin opened a new issue, #14215: URL: https://github.com/apache/datafusion/issues/14215
### Is your feature request related to a problem or challenge? `FirstValue` and `LastValue` can be faster! 1. When `ignore nulls` is passed, we [sort](https://github.com/apache/datafusion/blob/acf66d66537221ee7501a3be2e08c065a49efd4b/datafusion/functions-aggregate/src/first_last.rs#L263) groups, although getting just the first/last non-null value would be enough. 2. Without `ignore nulls`, there's still some small overhead that can be removed. For example, creating a [row buffer](https://github.com/apache/arrow-rs/blob/0503df42e5d5f6bd4d6f082d81bfe94875d0611d/arrow-ord/src/sort.rs#L720) for each row in our group. 3. For some primitive types, we can implement `GroupsAccumulator` similarly to `Min`/`Max`. ### Describe the solution you'd like _No response_ ### 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]
