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

   This PR adds support for the ranking `RANK()` and `DENSE_RANK()` window 
functions in Apache Pinot. These functions use only RANGE window frame types 
and an `ORDER BY` clause within `OVER()` is mandated by Apache Calcite. Types 
of queries where these ranking functions can be used are:
   
   - OVER(ORDER BY)(s)
   - OVER(PARTITION BY ORDER BY)(s) [the partition by and order by key can be 
the same]
   
   There are some limitations with `RANK()` and `DENSE_RANK()` which are:
   
   - Cannot use custom frames including explicitly setting the default custom 
frame. The default frame behavior is `RANGE BETWEEN UNBOUNDED PRECEDING AND 
CURRENT ROW`
   - Must include `ORDER BY` in the `OVER()` clause
   
   The design document and issue for window functions support can be found 
below:
   
   - Design document for Phase 1: 
https://docs.google.com/document/d/13CmFm4djI09JKF_Xty5acoXxJoxC9CLXAsmikgzgtIs/edit?usp=sharing
   - Window functions Issue: https://github.com/apache/pinot/issues/7213
   
   Prior Phase 1 PRs related to window functions:
   
   - Window Function Planner PR: https://github.com/apache/pinot/pull/10228
   - Window Functions Runtime PR for empty OVER() and OVER(PARTITION BY): 
https://github.com/apache/pinot/pull/10286
   - Adding ordering as a part of the SortExchange: 
https://github.com/apache/pinot/pull/10408
   - Window Functions Runtime PR for OVER(ORDER BY) and OVER(PARTITION BY ORDER 
BY): https://github.com/apache/pinot/pull/10449
   
   Support for ROW_NUMBER ranking function:
   - https://github.com/apache/pinot/pull/10587
   - Bug fix for empty LogicalProject issue (does not affect `RANK()` or 
`DENSE_RANK()` since an ORDER BY column is mandated): 
https://github.com/apache/pinot/pull/10635
   
   cc @siddharthteotia @walterddr @vvivekiyer @ankitsultana


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to