Skip to content

feat: retain aggregate state for cumulative averages - #36

Merged
meaningforger merged 1 commit into
mainfrom
codex/avg-partial-state
Oct 9, 2026
Merged

meaningforger merged 1 commit into
mainfrom
codex/avg-partial-state

Conversation

@meaningforger

Copy link
Copy Markdown
Contributor

Summary

  • extend plan-owned rollup contracts from a single merge operator to explicit retained-state components and finalization
  • lower root AVG(value) cumulative metrics through SUM(value) plus COUNT(value), componentwise window merging, and guarded decimal division
  • preserve fail-closed behavior for transformed AVG, DISTINCT, holistic, unknown, and incomplete state recipes
  • add a shared three-engine scenario where one value of 100 followed by nine zeroes must produce cumulative average 10 rather than 50
  • update the current specifications, RFC-0033 implementation history, README, capability evidence, and fingerprints

Validation

  • go test -p 4 ./...
  • go vet ./...
  • make fmt-check
  • make docs-check
  • bash tests/samples/run.sh
  • compiler assertions for DuckDB, Doris, and ClickHouse dialects

Real-engine result conformance will run through the explicit matrix workflow on this commit.

@meaningforger
meaningforger merged commit 0a52c0b into main Oct 9, 2026
8 checks passed
@meaningforger
meaningforger deleted the codex/avg-partial-state branch October 9, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant