-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CALCITE-5883] ROWS window aggregates ignore frames when there is no …
…ORDER BY clause Before this change, `SUM(x) OVER (ROWS 1 PRECEDING)` was treated the same as `SUM(x) OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)`. This was wrong - removing frames is correct for RANGE but not for ROWS. This change also fixes a special case, [CALCITE-6538] OVER (ROWS CURRENT ROW) should return a window with one row, not all rows In class RexWindowBound, add `isUnboundedPreceding()` and `isUnboundedFollowing()` convenience methods. Fix `RexWindow digest`, so that `OVER ()` is equivalent to `OVER (RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)` but not equivalent to `OVER (ROWS CURRENT ROW)`. Add Quidem tests for OVER, checked against Postgres. A few cosmetic changes, such as removing `assert x != null` when x is a parameter not declared `@Nullable`, adding static imports for `Objects.requireNonNull`, and changing `size() = 0` to `isEmpty()`. Close #3925
- Loading branch information
1 parent
4252e0c
commit 99a0df1
Showing
15 changed files
with
431 additions
and
94 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
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
Oops, something went wrong.