yashmayya opened a new pull request, #14273:
URL: https://github.com/apache/pinot/pull/14273

   - Builds on top of https://github.com/apache/pinot/pull/14249 (diff can be 
viewed here - 
https://github.com/yashmayya/pinot/compare/window-function-custom-window-frames...yashmayya:pinot:window-value-aggregators?expand=1).
 This PR will either be rebased once the first one is merged or else be 
combined with the first PR (depending on reviewer preference).
   - This patch introduces a new `WindowValueAggregator` interface along with 
implementations for `SUM`, `COUNT`, `MIN`, `MAX`, `BOOLAND`, `BOOLOR`. These 
use sliding window based aggregation algorithms to efficiently compute 
aggregates for windows.
   - The existing algorithm used a nested loop approach since it worked with 
the existing `Merger` interface and had a time complexity of `O(N * K)` where 
`N` is the total number of rows and `K` is the window size. The new algorithm 
introduced here has a time complexity of `O(N)`. `MIN` / `MAX` have a space 
complexity of `O(K)` due to the deque based approach and the others have `O(1)` 
space complexity (the older algorithm had `O(1)` space complexity for all the 
window functions).
   - This improves performance for `ROWS` based window frames on aggregate 
window functions massively, especially in cases where the window size is large.


-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to