diff options
| author | vitya-smirnov <[email protected]> | 2026-04-28 14:05:28 +0300 |
|---|---|---|
| committer | vitya-smirnov <[email protected]> | 2026-04-28 14:53:09 +0300 |
| commit | ce09b36bc19e2bdb51861a2afc4d7b2a2af5d01f (patch) | |
| tree | df3ad6e10676d1c078cad9a611ae92b20ead840f /contrib/tools/python3/Python/fileutils.c | |
| parent | e69308ce0aa633fe7d4dd5d4ecadc6d551d74673 (diff) | |
YQL-21046: Support window functions for YqlSelect
This patch adds support for `RowNumber`, `CumeDist`, `NTile`,
`Rank`, `DenseRank`, `PercentRank`, `Lead`, `Lag`, `FirstValue`,
`LastValue` and `NthValue`.
It gives +3 TPC-DS queries and +5 TPC-DS bugs unlocked.
The callable `YqlWin` was introduces, having the following form:
```yqls
(YqlWin
'function_name
'window_name
'() # options
(Void) # type slot
...) # args
```
During the callable type annotation and expansion the same code
for implementation functions substitution is used and shared even
with a pgSQL.
There was an issue with a `listType` for `YqlAgg`, `YqlAggWin`
and `YqlWin`, because it was built incorrectly by referencing
an atom "row" instead of _that_ argument row. It is fixed with
a new "type slot". Now it has 3 states: `(Void)`, which is set
by translator just as a stub, `row` that is set by
`YqlSetItemWrapper` during the `RebuildLambdaColumns`, so then
on the `YqlWin` type annotation it can take this `row` and wrap
it to the `listType`, pass to the function and call for a
repetition, so in a next stage the `resultType` will be ready.
commit_hash:256fc2cb359714a646a308359b340b1715919f5d
Diffstat (limited to 'contrib/tools/python3/Python/fileutils.c')
0 files changed, 0 insertions, 0 deletions
