tustvold opened a new issue, #7518: URL: https://github.com/apache/arrow-datafusion/issues/7518
### Is your feature request related to a problem or challenge? `BuiltInWindowExpr` currently makes use of the vectorised partition function when evaluating window frames with ranks, but falls back to a very inefficient mechanism based on performing scans using `Vec<ScalarValue>` as a comparison key for window functions that rely on the window frame, including user defined window functions. ### Describe the solution you'd like I may be missing something but it looks like window functions are only evaluated on data that is already sorted, as such it should be possible to identify the partition boundaries in a single pass, and then use this information to efficiently extract the window boundaries. Tagging @mustafasrepo and @alamb who may have more context on this design ### Describe alternatives you've considered _No response_ ### Additional context #7517 tracks remove ScalarValue's implementation of Ord to cleanup the code and discourage this sort of approach in future -- 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]
