TimeSeries: Support `LATEST` option in queries

Aperta
#3,265 5 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@var-nan ci sta già lavorando.

Dal 14/12/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

enhancement help wanted
Search before asking
  • I had searched in the issues and found no similar issues.
Motivation

When using TS.GET/TS.RANGE to query a compacted time series, the LATEST option can be specified. This causes TS.GET/TS.RANGE to return the compacted value of the latest bucket, which may be a partial bucket.

Redis reference:
https://redis.io/docs/latest/commands/ts.get/

Solution

Modify rangeCommon and getCommon to retrieve the latest bucket of source series when the latest sample is requested.

Note: Since partial aggregations are stored in DOWNSTREAM sub keys, we only need to fetch the last chunk of the source series to retrieve the latest bucket's aggregated value.

Refer to DOWNSTREAM sub keys
Refer to https://github.com/apache/kvrocks/pull/3151

Are you willing to submit a PR?
  • I'm willing to submit a PR!
Lingua principale
C++
Stelle
4.5k
Fork
686
Merge medio
2g 13h
PR unite (30g)
40

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

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 apache/kvrocks

Tutte le issue di apache/kvrocks

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.