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

   This PR adds support for `ROWS` type window frames for aggregation window 
functions with an `ORDER BY` clause within the `OVER()`. The default frame type 
for `ORDER BY` within `OVER()` is `RANGE BETWEEN UNBOUNDED PRECEDING AND 
CURRENT ROW`. This PR adds support for the same default frame boundaries but 
with `ROWS` type.
   
   Issue: https://github.com/apache/pinot/issues/11406
   
   Example queries this can support:
   - SELECT AVG(a.col1) OVER(ORDER BY a.col2 ROWS UNBOUNDED PRECEDING) from 
table;
   - SELECT COUNT(a.col3) OVER (PARTITION BY a.col1 ORDER BY a.col2 ROWS 
BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) from table;
   
   This also allows the use of `ROW_NUMBER()` (which only allows `ROWS` type 
frames) with aggregation functions, such as:
   - SELECT ROW_NUMBER() OVER (PARTITION BY a.col1 ORDER BY a.col2), 
SUM(a.col3) OVER (PARTITION BY a.col1 ORDER BY a.col2 ROWS BETWEEN UNBOUNDED 
PRECEDING AND CURRENT ROW) from table;
   
   The supported functions with this change are:
   - COUNT
   - SUM
   - AVG
   - MIN
   - MAX
   - BOOL_AND
   - BOOL_OR
   - ROW_NUMBER (this was [already 
supported](https://github.com/apache/pinot/pull/10587), no new changes in this 
PR for this)


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