graphprotocol / graphprotocol/graph-node
[Feature] Windowed aggregates
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Rust
- Sterne
- 3.2k
- Forks
- 1.1k
- Ø Merge
- 4 T. 1 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
Description
Aggregates can be formed either over the current bucket (hour, day) or the entire lifetime of the underlying timeseries. In some cases, it would also be useful to aggregate over a limited window, e.g., the last 6 hours. That could look something like
recent_max_price: BigDecimal! @aggregate(fn: "max", arg: "price", window: 6)
The current ways to aggregate would be expressed as window: 1 (default) and window: "all" (lifetime/cumulative)
There's a bunch of things that aren't entirely clear:
- Is it enough if the window is always an integer multiple of the bucket? Or should we offer expressing arbitrary times there, like
window: "90 minutes" - How would users express that a windowed aggregate should be done for one interval but not the others, e.g., if the above aggregation is done both hourly and daily, how do you express "only add this to the hourly aggregates"
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Es werden keine Dateien, Tests oder Einstiegspunkte genannt. Beginne damit, die vorhandene Aggregatsyntax sowie die Funktionsweise von Aggregaten für den aktuellen Bucket und für die gesamte Lebensdauer zu prüfen; für den Abschluss müssen eine vereinbarte Darstellung des Zeitfensters und eine Intervallabgrenzung festgelegt sein, mit Tests, die begrenzte, standardmäßige und Zeitfenster über die gesamte Lebensdauer abdecken.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- graphql, rust
- Bereich
- api, data
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100