Repository navigation
Commit cae12ad
docs: a window aggregate's rid is chunk-relative, not a partition row
The per-row window callback's `rid` was documented as the output row's index
within the partition (AggregateWindowRequest, AggregateFunction.window(),
AggregateClient.window()). It is not: DuckDB's WindowCustomAggregator
evaluates one output chunk at a time and calls the callback with `i`, the
row's index within that chunk (0 <= i < STANDARD_VECTOR_SIZE); the partition
row is `row_idx + i`, which the per-row callback never receives. The
extension forwards DuckDB's value untouched (it is also the index it copies
the result into), so a worker that used `rid` to index the partition read the
wrong rows past the first chunk.
The frames were always partition-relative, and they are what a worker must
use. The batched path is unchanged and correctly documented: its `row_idx`
is the partition row of the first output row, and the default window_batch()
passes partition rows to window() — so `rid` now says it identifies the row
and must not be used to index the partition.
Docstrings are outside the protocol hash, so no port's reflection changes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 04a6147 commit cae12ad
3 files changed
Lines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
522 | 529 | | |
523 | 530 | | |
524 | 531 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
375 | 378 | | |
376 | 379 | | |
377 | 380 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2887 | 2887 | | |
2888 | 2888 | | |
2889 | 2889 | | |
2890 | | - | |
| 2890 | + | |
| 2891 | + | |
| 2892 | + | |
| 2893 | + | |
2891 | 2894 | | |
2892 | 2895 | | |
2893 | 2896 | | |
| |||
0 commit comments