graphprotocol / graphprotocol/graph-node
[Feature] Windowed aggregates
Nessuno ha ancora preso questa issue.
- Lingua principale
- Rust
- Stelle
- 3.2k
- Fork
- 1.1k
- Merge medio
- 4g 1h
- PR unite (30g)
- 1
Descrizione
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"
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Non vengono indicati file, test o punti di ingresso. Inizia esaminando la sintassi di aggregazione esistente e il funzionamento delle aggregazioni del bucket corrente e dell’intera durata; per considerarlo completato servono una rappresentazione concordata della finestra e un ambito dell’intervallo, con test che coprano finestre delimitate, predefinite e dell’intera durata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- graphql, rust
- Ambito
- api, data
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100