Repository navigation
perf(query): stream certified aggregate groups (#781) - #793
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.
Summary
Release completed groups for certified ordinary sum/avg, scalar min/max and Integer/nil sum-distinct queries. Effective grouping tuples can include hidden
:withkeys, constants and repeated slots when they reduce to one ascending Integer/Boolean dimension; existing single numeric/Boolean grouping stays supported. Argument domains are proved from constants, metadata or complete raw attribute history through the pinned reader.Unproved arguments, pending/staged writes, callbacks, collect-set, rules and aggregate+window queries retain full-input evaluation. Any requested
:withSort remains. Limits count emitted groups after min/max drops. One growing distinct group remains linear.Fixes #781. Targets
v3; depends on merged #777 and #789. No syntax, public API, dependency, configuration or file-format change.Type of change
Checklist
cargo testpassescargo clippy -- -D warningsis cleancargo fmt --checkpassesunwrap()/expect()in library code pathsCHANGELOG.mdupdated underUnreleasedValidation
Complete default suite: 2,037 active tests. Final test refinements: 202 engine tests and all 2,056 non-fault test-hook tests; the 16 unchanged fault-matrix tests passed in the complete default run. Frozen answers unchanged. Native/browser/WASI strict lint, WASI execution/release build, 14 final portable proof tests and 63 Firefox tests pass. Ten new 1K Criterion IDs smoke-tested; existing nightly routing includes all sizes. The corrected ignored 1M-group memory acceptance test passes under the actual nightly bench profile: ordered sum fits 32 MiB, while floating sum-distinct retains the QRY-012 control. Required all-features clippy passes; an exploratory integration-target lint command reports test-only violations also present on the unchanged base and is outside the CI gate.
The final default release binary is 1,263,592 bytes, 24 below the unchanged 1,263,616-byte cap. The final docs-site build passes all 13 versions / 368 pages against core
662859ce2and docs7664c5d. See test inventory and run boundaries and benchmark evidence, raw records and reproduction.At 100K–10M facts, fixed-group Aggregate peaks stay at 480–1,200 bytes. At 10M, eligible full drains improve by 17.4–31.2%; limit-10 queries take 0.60–0.81 ms. All startup/RSS gates pass. Existing ordinary guards peak at +1.04%, history guards at +0.97%, and supporting ordinary controls at +1.31%, below the 5% limit. Small newly eligible grouped point queries pay 176–188 µs of proof startup cost. All 1,044 application-profile records and 126 holder records are included; the earlier size-profile matrix is explicitly supplemental.
Notes for reviewer
The approved resource-error policy follows existing ordered counts: common result-buffer allocation/charge QRY-012 can precede a later unread source failure. Aggregate-specific fallible finalizers receive no exception and keep full-drain evaluation. Tests compare both paths explicitly.
Claude approved the runtime, test refinements, complete benchmark evidence, versioned documentation and nightly acceptance correction with no blockers. Docs-site PR: project-minigraf/minigraf-docs#88.