Skip to content

fix(scoring)!: count changed group keys in changed_key_count - #211

Merged
blackopsrepl merged 1 commit into
mainfrom
feature/210-changed-key-count
Nov 5, 2026
Merged

blackopsrepl merged 1 commit into
mainfrom
feature/210-changed-key-count

Conversation

@blackopsrepl

Copy link
Copy Markdown
Collaborator

Closes #210. Base main @ 36021382, one commit 40e95abc.

New GroupedOperator<S>: Operator<S> with changed_group_count(): GroupNode records its changed-group set size; ComplementNode and JoinNode over a grouped input delegate. SharedOperatorTerminal adds it per notification. BREAKING footer (terminal bound and the field's meaning).

Tests: projected two-bucket projection (one notification, two keys); complemented and grouped-join nodes (non-grouped-side notification: rows change, zero keys; grouped-side: one key per group). Mutation restoring the old one-per-notification increment fails the complemented and projected tests.

Gate (fmt, clippy, doc-names file-length facade-reachability public-api deps, rustdoc, examples, workspace all-feature tests, doctests): EXIT 0, 1588 passed, 0 failed, 71 result lines.

SharedNodeDiagnostics::changed_key_count was incremented together with
update_count, one per row-changing notification, so it duplicated it. A
new GroupedOperator trait reports how many group keys an operator's last
insert or retract changed: GroupNode records the size of the changed-group
set it already builds, and ComplementNode and JoinNode over a grouped
input report that input's count. Each notification now adds that count, so
one notification can add several keys, or none when only a complemented
or joined node's non-grouped side changed.

Closes #210.

BREAKING CHANGE: SharedOperatorTerminal requires its operator to
implement GroupedOperator, and changed_key_count now sums changed group
keys instead of counting row-changing notifications.
@blackopsrepl
blackopsrepl merged commit 40e95ab into main Nov 5, 2026
17 of 18 checks passed
@blackopsrepl
blackopsrepl deleted the feature/210-changed-key-count branch November 5, 2026 10:24
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.

SharedNodeDiagnostics::changed_key_count duplicates update_count

1 participant