[
https://issues.apache.org/jira/browse/DRILL-3200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Deneche A. Hakim updated DRILL-3200:
------------------------------------
Attachment: DRILL-3200.1.patch.txt
This is an non final patch, although all required window functions have been
implemented the code still needs to be cleaned and properly commented. Here is
a list of changes made:
* enum WindowFrameRecordBatch.WindowFunction to handle supported window
function and their corresponding output MajorType
* renamed WindowFrameTemplate -> DefaultFrameTemplate, cleaned the template to
handle the default frame efficiently:
** a batch can be processed as soon as we find the last peer row of it's last
row
** once a batch is processed it can be safely released => we can transfer it's
value vectors to the container instead of copying them
* DefaultFrameTemplate.Partition tracks the current window frame and computes
the following window functions automatically: row_number, rank, dense_rank,
percent_rank, cume_dist. It doesn't need to aggregate the value vectors to
compute these window functions
* updated TestWindowFrame to check the results of row_number, rank, dense_rank,
percent_rank and cume_dist in various cases
** added a debug config option to MSorter to control the size of batches. This
is needed by TestWindowFrame so it can use small test data files (20 rows per
batch)
** removed contrib/data/window-test-data
* WindowFrameRecordBatch properly releases saved batches if the query stops
prematurely
* GenerateTestData can be used to generate test data for the window function
unit tests [it's a work in progress and can be either improved to make it
developer friendly or removed from the final patch]
> Add Window functions: ROW_NUMBER, RANK, PERCENT_RANK, DENSE_RANK and CUME_DIST
> ------------------------------------------------------------------------------
>
> Key: DRILL-3200
> URL: https://issues.apache.org/jira/browse/DRILL-3200
> Project: Apache Drill
> Issue Type: Improvement
> Components: Execution - Relational Operators
> Reporter: Deneche A. Hakim
> Assignee: Deneche A. Hakim
> Fix For: 1.1.0
>
> Attachments: DRILL-3200.1.patch.txt
>
>
> add support for the following window functions:
> - ROW_NUMBER
> - RANK
> - DENSE_RANK
> - PERCENT_RANK
> - CUME_DIST
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)