blaginin opened a new pull request, #14402: URL: https://github.com/apache/datafusion/pull/14402
## Which issue does this PR close? Closes https://github.com/apache/datafusion/issues/14215 ## Rationale for this change Right now, merging / updating batches in `first_value` / `last_value` we sometimes sort input to find just one max / min row. In some cases, we request to sort only top-1 value but even that produces extra index buffers... ## What changes are included in this PR? Instead of sorting arrays, just finding min / max directly. ## Are these changes tested? Yes, by `aggregate.slt`. Also added new benches to illustrate the speed improvement ## 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org