forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
colexec: implement lag and lead window functions in vectorized engine
`lag` and `lead` are window functions that return an expression evaluated at some row `offset` rows from the current row, defaulting to `default` if such a row does not exist in the partition. This patch provides vectorized implementations of the `lag` and `lead` window functions. The logic to buffer each partition into a queue is now separate from calculation of the window function itself so that `lag`, `lead`, and `ntile` (and others) can share common logic. As before, each batch is emitted as soon as its output column has been entirely filled. See cockroachdb#37035 Release note (sql change): the vectorized engine now supports the lag and lead window functions.
- Loading branch information
1 parent
408deef
commit 656d50e
Showing
17 changed files
with
5,367 additions
and
56 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
Oops, something went wrong.