This repository has been archived by the owner on Sep 18, 2023. It is now read-only.
Peers' values should be considered in window function for CURRENT ROW in range mode #1166
Labels
bug
Something isn't working
Describe the bug
In RANGE mode, CURRENT ROW refers to any peer row of the current row. Rows are peers if they have the same values for the ORDER BY fields. A frame start of CURRENT ROW refers to the first peer row of the current row, while a frame end of CURRENT ROW refers to the last peer row of the current row. If no ORDER BY is specified, all rows are considered peers of the current row.
The default RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT is used in our supported sum window function with sorting. But we have not considered peers in the impl., i.e., we should sum up all peers' values instead of just summing up the value of current single row.
The text was updated successfully, but these errors were encountered: