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
fix(query-engine): reject sum-weighted heap CMS for COUNT matching #666
Capability matching currently allows CountMinSketchWithHeap to satisfy ordinary Statistic::Count requirements without checking its count_events weighting. A heap configured with count_events: false is value-weighted (SUM semantics), but can therefore be selected for COUNT and return summed values.
Expected behavior
Ordinary COUNT matching must reject heap sketches with count_events: false and accept sketches whose count_events is true or omitted (the existing default). Existing Top-k weighting behavior must remain unchanged.
Acceptance criteria
Add behavioral capability-matching tests covering both heap weighting variants.
Ensure a SUM-weighted heap cannot serve ordinary COUNT.
Preserve existing Top-k matching semantics.
Implement test-first (TDD).
Found during review of #665, Roborev job #124 finding 4.
Activity
fix(query-engine): reject sum-weighted heap CMS for COUNT matching