You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rs-drive: GroupByIn + range no-proof folds In branches #3716
AverageMode::GroupByIn promises one aggregate entry per In value, but the
no-proof range path folds all In branches into a single aggregate entry with in_key: None / empty key. The prove path preserves per-In branches, so
prove and no-proof behavior diverge for the same query shape.
Found while reviewing #3603, but this is pre-existing query-layer behavior, not
a regression from that shielded-spend PR.
When AverageMode::GroupByIn is combined with a range clause, the no-proof
branch unwraps the joint executor's folded Aggregate { count, sum } and
rewraps it as a single AverageEntry. That loses the In axis entirely, so
callers cannot distinguish which In value contributed what.
This conflicts with:
AverageMode::GroupByIn docs in drive_document_average_query/mod.rs, which
describe one entry per In value.
The prove path in drive_document_average_query/drive_dispatcher.rs, which
preserves per-In branches for GroupByIn + range.
Expected resolution
Either:
Preserve per-In(count, sum) entries on the no-proof path, matching the
documented GroupByIn contract and the prove path, or
Update the public AverageMode::GroupByIn documentation to explicitly state
that GroupByIn + range no-proof queries fold across In values.
Activity