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

Abierto
#1,214 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@dwcullop ya está trabajando en esto.

Desde el 28/10/2026.

  • #1219 de @dwcullop — abierto

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
20/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
csharp
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
C#
Estrellas
1.9k
Forks
194
Merge medio
12 min
PR fusionados (30 d)
1

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de reactivemarbles/DynamicData

Todos los issues de reactivemarbles/DynamicData

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.