Support the `SUNIONCARD` command

Aperta
#3,723 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@PoisonGodv ci sta già lavorando.

Dal 3/11/2026.

  • #3746 di @PoisonGodv — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
58/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp, redis
Ambito
backend, database

Direzione di ricerca

Start by locating the existing set union command implementation and its tests in Kvrocks, then read how commands parse key counts and optional arguments. Add support for SUNIONCARD with the documented APPROX and LIMIT options; done means its results match the examples and Redis command behavior.

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

Descrizione

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

Redis 8.10.0 added SUNIONCARD (redis/redis#14893). It returns the cardinality of the union of the given sets, without sending the members back to the client.

Syntax (Redis 8.10.0)

SUNIONCARD numkeys key [key ...] [APPROX] [LIMIT limit]

Example

> SADD key1 a b c
(integer) 3
> SADD key2 c d e
(integer) 3
> SUNIONCARD 2 key1 key2
(integer) 5
> SUNIONCARD 2 key1 key2 LIMIT 3
(integer) 3
> SUNIONCARD 2 key1 key2 APPROX
(integer) 5
Solution

No response

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 19h
PR unite (30g)
37

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.