[Feature]: Make Avg, StdDev, Maximum and Minimum refresh-aware, consistent with Sum

Aperta
#1,214 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@dwcullop ci sta già lavorando.

Dal 28/10/2026.

  • #1219 di @dwcullop — aperta

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
20/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
csharp
Ambito
backend

Direzione di ricerca

Read the implementation of Sum and the changes in linked pull request #1219, then trace Avg, StdDev, Maximum, Minimum, Count, IsEmpty and IsNotEmpty through the ForAggregation pipeline. Compare their refresh behavior and decide which operators need stateful projections, immutable variants, or documentation; done means the aggregates behave consistently with the agreed 10.0 model and the release notes describe the behavior and memory impact.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

breaking change enhancement
Describe the functionality desired 🐞

The changeset aggregates ignore Refresh. They go through the internal ForAggregation() pipeline, which drops refresh changes, so when an item is mutated in place and refreshed, the aggregate keeps the stale value.

#1167 makes Sum refresh-aware (and adds SumImmutable for the stateless behaviour). Once it merges, Sum will be the only aggregate that honours Refresh, which is inconsistent with Filter, Sort and Group, and with each other: Sum and Avg over the same pipeline would disagree after a refresh.

The remaining aggregates should follow the same model for 10.0.

The steps the functionality will provide
  1. Avg (AvgEx): re-evaluate the selector on Refresh, using stored per-item projections like Sum.
  2. StdDev (StdDevEx): same.
  3. Maximum / Minimum (MaxEx): same; a refresh can move the extreme value, so the current max/min must be recomputed when the refreshed item held it.
  4. Count / IsEmpty / IsNotEmpty (CountEx): no selector, so Refresh cannot change the result. Confirm and document; no behaviour change expected.
  5. Decide per operator whether to add an *Immutable stateless variant, matching SumImmutable.
  6. Share one internal stateful helper rather than duplicating the cache and list bookkeeping per operator.
Considerations

Follow-up to #1167. This is a behavioural change (refresh now alters emitted values, and per-subscription memory becomes O(n)), so it should land in 10.0 alongside the Sum change and be called out in the release notes.

Lingua principale
C#
Stelle
1.9k
Fork
194
Merge medio
12m
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di reactivemarbles/DynamicData

Tutte le issue di reactivemarbles/DynamicData

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.