Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
Description
as part of the review for DRILL-3536 two main comments were left aside and will be addressed by this JIRA:
- refactor DefaultFrameTemplate into separate templates, each one handles a different "family" of window functions (e.g. aggregate vs ranking)
- setupEvaluatePeer() should not be called more than once per incoming batch
The review for DRILL-3952 did expose a couple of improvements that should be made as part of this JIRA (I will create separate tasks later):
- there are 2 categories of the window functions: one that require all batches of the partition before they can start processing and second that can start work with partial partition as long as we have all peer rows of the current row. We should refactor the code to have derived classes dedicated to the 2 categories.
- Before processing a partition, we do a first pass to compute the length of the partition. Not all window functions need to know the length of the partition. We should be able to refactor the code to avoid this pass unless it's required by one of the window functions