-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support negative preceding/following for ROW-based window functions (#…
…9229) This commit adds support for negative values for preceding/following offsets specified for `ROW` based window functions. Prior to this commit, window function queries such as the following were not supported: ```SQL SELECT MIN(x) OVER (PARTITION BY grp ORDER BY oby ROWS BETWEEN 5 PRECEDING AND -1 FOLLOWING) min_x FROM mytable ``` For this query, the window includes all rows between upto 5 rows preceding the current row, and the previous row. This functionality is currently supported only for: 1. `AVG` 2. `COUNT(1)`/`COUNT(*)` 3. `MAX` 4. `MIN` 5. `SUM` 6. `COLLECT_LIST` 7. `COLLECT_SET` Signed-off-by: MithunR <[email protected]>
- Loading branch information
Showing
4 changed files
with
161 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters