Repository navigation
feat: add lag and lead window functions (#182) - #763
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and result
Window queries could rank and aggregate ordered partitions but could not read a neighboring row.
lagandleadnow return the preceding or following row's value within a partition, using the existing total order (including tie breaks). They returnnilat partition boundaries and operate over grouped rows after aggregation. The plain(lag ?v)and(lead ?v)forms still resolve to registered user aggregates; the built-ins use:over.This places #182 in v3.0.0, as agreed with the maintainer.
PRS-030remains registered and is documented as deprecated. No storage format, dependency, or public Rust API changes are involved.Validation
cargo test --quiet(1880 tests: 1866 passed, 14 ignored)cargo test --features test-hooks --test plan_independence_test --quiet(16 passed)cargo clippy --all-features -- -D warningscargo fmt --all --checkThe local release build's increase over untouched
origin/v3was under 1 KiB on the same toolchain; the exact baseline commit passed the CI binary-size gate at 1213 KiB of 1230 KiB. CI on this PR is the authoritative size check. A pre-existing gap in memory accounting for temporary window result columns is tracked in #761.Companion docs-site PR: project-minigraf/minigraf-docs#74. Merge the core PR first.
Refs #182